DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax for AddDB using VBScript

Hi,

 

I have seen the "wizard 10.2" and it looks really nice. In the srcipt I have tryied to change the lines wereit connects to the database but without success.

I believe that is a syntax error from my side. Perhaps you can indicate me the rigth syntax... I can't find out the error.

 

This is the example in the file:

 

 '       AddDB(DBs, "Data Base Name | UserName | Password | QuoteStr | DateStr | Access File Path or ADO Connection String ")

DBs = AddDB(DBs, " SQL_Weather   |                  |                |    []         |     #      | " & AutoActPath & "SQL_Weather.mdb")
  '    If you have a DSN, your ADO Connection String = "DSN=_____;UID=_____;PWD=_____;"

 

 

This is my DSN file:

 

[ODBC]
DRIVER=MySQL ODBC 5.1 Driver
UID=root
PORT=3306
DATABASE=test
SERVER=140.30.135.20

 

How would the final string be defined in the script file ? Would it be something like this ?

 

'       AddDB(DBs, "Data Base Name | UserName | Password | QuoteStr | DateStr | Access File Path or ADO Connection String ")

DBs = AddDB(DBs, "    |   test       |                |    []         |     #      | " & AutoActPath & "DSN=140.30.135.20;UID=root;PWD=xxxtp;")

 

Thanks.


0 Kudos
Message 1 of 2
(3,547 Views)

Hi,

 

I have a question, do you use a DSN?

You write DSN= and an server adress but you need to put the name of DSN. You need to link the DSN and the server IP with ODBC.

 

If you want to connect without DNS you can try with 

"UID=root;PWD=xxxtp;DRIVER={SQL Server};Server="
& servername & ";Database=SQL_Weather;"

 

 

 

Regards,

Message Edité par ajangot le 08-03-2009 08:42 AM
0 Kudos
Message 2 of 2
(3,521 Views)