views:

327

answers:

4

I need information on JavaScript/VBScript with SQL database. I'm currently doing scripting. My problem is, in scripting, how to connect and insert some data to a MySQL database.

I did find something mentioning on client/server side database. Do I need to consider that also? I'm not building the application for the Web services.

A: 

In order to insert data into a MySQL database you would need to have some type of application layer running on the server (PHP, Ruby on Rails, ASP.NET, whatever).

You should work with the people that are building the application side web services to get this sorted out.

Mike Buckbee
Yes thank you..the tutorial helps alot. i did try running the programs, i got no problem with DNS, but without DNS, i dont know how to get this one: ConnString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=Status.mdf; " PASSWORD=mysql_password; OPTION=3". What is the Driver, UID, Password. if i dont have those, how to assign as empty? thanks.
A: 

Here's a VBScript sample using a DSN and DSNless connection:

http://www.webcheatsheet.com/ASP/database_connection_to_MySQL.php

The sample is using ASP but ASP on the server side (everything inside the <% %>) is VBScript.

klabranche
Yes thank you..the tutorial helps alot. i did try running the programs, i got no problem with DNS, but without DNS, i dont know how to get this one: ConnString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=Status.mdf; " PASSWORD=mysql_password; OPTION=3". What is the Driver, UID, Password. if i dont have those, how to assign as empty? thanks. – unknown (google) 0 secs ago
The driver is the name/description of the way you are connectioning to MySQL. You have to have a driver to connect. Likely when you installed MySQL on your box it installed some default drivers and ODBC 3.51 is likely the default driver (don't know that for sure).
klabranche
klabranche
how n where can i find this default driver? I have SQL Server 2005 installed in my machine. thx
I thought you were using MySQL? The drivers installed on your machine can be found under Administrative Tools, Data Sources (ODBC). There's a tab called drivers. These are what are installed on your PC. Here's a link to a site that has references to connection strings for various DB's. http://www.connectionstrings.com/ It can come in handy to help you get the right connection string.
klabranche
hmm...MySQL and Microsoft SQL Server is not the same? i thought both using sql queries?? Correct me if im wrong..! thx
still having problem..even i try to look here: http://www.connectionstrings.com/sql-server-2005 but still cannot figure out what to put..please i'm really stuck!
Finally solve the problems..thank u very much for the help
A: 

Are you using WSH? Try using ADO and the solution provided by klabranche.

Rodrigo
Yes, for now using WSH. Thanks to response from klabranche, i can connect using access database. But i wanna using MySQL database instead.Now got problem/errors on how to get/assign the connection string. Are you also using WSH? Any good tutorial using WSH? thx
A: