Linker IT Software
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Using the connect command with ADO connections (Read 4098 times)
Gerrit-Jan Linker
YaBB Administrator

Posts: 75
Using the connect command with ADO connections
11.09.06 at 10:47:16
Using the connect command with ADO connections
Brad from Canada asked the following question:
I'm having a little problem with the connect command.  I can connect fine through the connection dialog box but when I try to embed the connection information into the query I have, I get a connection failure.
Here is what I have going on.  I took all of the values from the connection dialog box.  
connect bookrunner/test@Bookrunner9,MSDASQL.1;
Investigating your problem I found out that this feature did not work too well. I have made a fix which will be implemented in SQL*XL 4.1.2.
You are correct that you can use a connect statement to connect to the database. This can be handy if you want to switch the database connection in a script. The syntax is:
connect user/pass@database,connectionstring
When you connect to Oracle through OO4O you just use: connect user/pass@database;
With ADO connections the database setting is ignored and it is read from the connectionstring.
I have used the following command to successfully connect to MS Access:
connect admin@,"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\BIBLIO.MDB;"
Note I have omitted the password. If a password for your database is required use:
connect your_username/your_password@.......
Also note I have omitted the database name but I did put the comma in the command.
Finally note that I have put the connection string in quotes. If you omit the quotes SQL*XL may be confused about the semi colons.
Back to top
« Last Edit: 11.09.06 at 10:53:05 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1