How to Create database in SQL Server using Javascript & HTML?

Please support our MS SQL advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Oct 2009
Posts: 2
Reputation: Rahul002 is an unknown quantity at this point 
Solved Threads: 0
Rahul002 Rahul002 is offline Offline
Newbie Poster

How to Create database in SQL Server using Javascript & HTML?

 
0
  #1
27 Days Ago
Hello,

I want to create database on SQL Server using Javascript and HTML. User will input following data. Server Name, Database name, File Sizes. When I will click "Submit" button database should be created on Selected server with entered name. I am using Client side HTML and Javascript.
we need to create database according to some standards thus we are preparing graphical user interface.
Quick response will be appreciated.

Thanks, Rahul
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 304
Reputation: Thirusha is an unknown quantity at this point 
Solved Threads: 48
Thirusha's Avatar
Thirusha Thirusha is offline Offline
Posting Whiz
 
0
  #2
26 Days Ago
I dont think you can do that, you are going to need a server side language, like ASP, Java, PHP etc that will be able to communicate with the database.
Life... Is a Moment
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,177
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 481
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer
 
1
  #3
25 Days Ago
@Thirusha correction, you can do DB connectivity with AJAX which is essentially JavaScript
Last edited by peter_budo; 25 Days Ago at 4:22 pm.
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 42
Reputation: kplcjl is an unknown quantity at this point 
Solved Threads: 4
kplcjl kplcjl is offline Offline
Light Poster
 
-1
  #4
24 Days Ago
Originally Posted by Rahul002 View Post
Hello,

I want to create database on SQL Server using Javascript and HTML. User will input following data. Server Name, Database name, File Sizes. When I will click "Submit" button database should be created on Selected server with entered name. I am using Client side HTML and Javascript.
we need to create database according to some standards thus we are preparing graphical user interface.
Quick response will be appreciated.

Thanks, Rahul
Impossible. Javascript is not designed to do work on another server, it is client side software that only runs on the client. Both HTML and JavaScript can post to a cgi which could do something like this. If the server name entered also hosts the cgi, Javascript could post the instructions to the server name's cgi and let it do the work. That or the client hosts the cgi and the user account has access to the server name.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 304
Reputation: Thirusha is an unknown quantity at this point 
Solved Threads: 48
Thirusha's Avatar
Thirusha Thirusha is offline Offline
Posting Whiz
 
0
  #5
20 Days Ago
@Peter_budo, based on his question, i think that i am correct in saying that it cant be done, one can use ajax, but you will still need a server side language, one cannot connect directly to the database just using javascript.
Life... Is a Moment
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,177
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 481
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer
 
0
  #6
20 Days Ago
We may never know as Rahul002 was so rude as to never reply what he/she is up to...
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 42
Reputation: kplcjl is an unknown quantity at this point 
Solved Threads: 4
kplcjl kplcjl is offline Offline
Light Poster
 
0
  #7
20 Days Ago
Originally Posted by peter_budo View Post
@Thirusha correction, you can do DB connectivity with AJAX which is essentially JavaScript
Sorry, I forgot about AJAX. It isn't just JavaScript. It is a combination of JavaScript and XMLA. One of the key phrases in the AJAX tutorial is "AJAX uses the XMLHttpRequest object". This is, in effect your cgi link I was talking about. The intent in the tutorial was to connect to a server that had your DB interface already built.
I assumed that the request was to create a database on the client since JavaScript is and remains client-side code only. I can't think of any valid reason for creating a database on the server-side. If he is dead-set on creating a DB on the client side, I suppose it is possible using AJAX, I still say it is impossible using JavaScript. You would need an unnamed SQL Server object running on the client, the person running the web page would need admin rights on SQL, you would connect using the local IP address, verify the DB doesn't exist on the client server and create it.
I sincerely hope and pray that using AJAX to create a DB on my server is impossible as well. I hate to think what a set of malware could do to me being able to connect to me, as me, just by setting up a web page. I hate what they can do now that requires a constant update of sentry software.
Last edited by kplcjl; 20 Days Ago at 4:47 pm. Reason: clarify statement
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 2
Reputation: Rahul002 is an unknown quantity at this point 
Solved Threads: 0
Rahul002 Rahul002 is offline Offline
Newbie Poster

Thanks

 
0
  #8
19 Days Ago
Originally Posted by peter_budo View Post
@Thirusha correction, you can do DB connectivity with AJAX which is essentially JavaScript

Hello,

Thanks for your response. My requirement was to create database on SQL 2005 Server with my local machine using any language. But we cant use any application server for this, Hence i wanted to do this using client side scripting. I will find is AJAX suitable for this sceneario or not. I really appreciate your efforts.

Thanks,
Rahul
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 42
Reputation: kplcjl is an unknown quantity at this point 
Solved Threads: 4
kplcjl kplcjl is offline Offline
Light Poster
 
0
  #9
18 Days Ago
Again, I sincerely hope you find it is IMPOSSIBLE to put a DB on my SQL server if I happen to link to your web site. There are enough security holes to drive a mack truck through without adding this one to it.
I'm kind of conflicted because I usually don't want someone to fail in their endevours, but I definitely hope you fail.
Reply With Quote Quick reply to this message  
Reply

Tags
sqlserver

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC