fylix0000
asked on
Script to test an ODBC connection?
I am not sure if this is the right place to ask but here goes:
I have a user who manually setup a System DSN ODBC connection for SQL 2000.
I can only as for a name of that connection such as "ODBC_SQL", this name is the DSN configuration for SQL 2000 that he allready stated the server, the user name and password and which database to connect to in the setting.
He is running window 2000.
I know the driver he use is " sun.jdbc.odbc.JdbcOdbcDriv er",
I am unsure but the URL can be "jdbc:odbc:ODBC_SQL "
Is there a vb script that I can use to connect to his datbase to test if certain table exists? so that when I run the script, if the table exists then I get a pop up message saying good connection, else saying bad connection?
I have a user who manually setup a System DSN ODBC connection for SQL 2000.
I can only as for a name of that connection such as "ODBC_SQL", this name is the DSN configuration for SQL 2000 that he allready stated the server, the user name and password and which database to connect to in the setting.
He is running window 2000.
I know the driver he use is " sun.jdbc.odbc.JdbcOdbcDriv
I am unsure but the URL can be "jdbc:odbc:ODBC_SQL "
Is there a vb script that I can use to connect to his datbase to test if certain table exists? so that when I run the script, if the table exists then I get a pop up message saying good connection, else saying bad connection?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>Dim rs1=adodb.recordset
it should be
dim rs as adodb.recordset
it should be
dim rs as adodb.recordset
if you use vbscript
you need to declare as just
dim rs
ie
dim c1 as adodb.connection
set c1 = wscript.createobject("adod b.connecti on")
you need to declare as just
dim rs
ie
dim c1 as adodb.connection
set c1 = wscript.createobject("adod
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Line: 1
Char: 8
Error: Expected end of statement
Code: 800A0401
Source: Microsoft VBScript compilation error.
Sorry if I sound clueless because I am :)