SystemDSN <-> UserDSN 
Author Message
 SystemDSN <-> UserDSN

I have a working script that queries an ODBC datasource. It does work
however only with an established UserDSN. How do I need to change the
connection string, so that it would use an SystemDSN as well?

    Set conn = WScript.CreateObject("ADODB.Connection")
    conn.ConnectionString = "Provider=MSDASQL;DSN=Anzeigen"
    conn.open

Thank you

--

Gru?
Hubert Daubmeier
I am working on http://www.*-*-*.com/
and now on http://www.*-*-*.com/



Thu, 08 Mar 2001 03:00:00 GMT  
 SystemDSN <-> UserDSN
This works for me with a System DSN...

ConnectionString="DSN=WSH;UID=dbUserID;APP=WSH;WSID=BatchPC;DATABASE=WSH"
Set WshShell = WScript.CreateObject("WScript.Shell")
Set Conn = WScript.CreateObject("ADODB.Connection")
Conn.Open ConnectionString,"userID","password"

Ian Morrish
WSH FAQ http://wsh.glazier.co.nz
Home page http://www.glazier.co.nz
NetMeeting http://ils.glazier.co.nz


Quote:
>I have a working script that queries an ODBC datasource. It does work
>however only with an established UserDSN. How do I need to change the
>connection string, so that it would use an SystemDSN as well?

>    Set conn = WScript.CreateObject("ADODB.Connection")
>    conn.ConnectionString = "Provider=MSDASQL;DSN=Anzeigen"
>    conn.open

>Thank you

>--

>Gru?
>Hubert Daubmeier
>I am working on http://www.neuburg.baynet.de/lokal/karlskro/
>and now on http://www.karlskron.de/



Thu, 08 Mar 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. --------<<<<<<MONEY>>>>>>--------- id 9543

2. <<<< Disabling the ControlBox, MinButton and MaxButton >>>>

3. Win98 user <font color="blue"><B>profiles</B></font>

4. <<, >> operators to Level 1

5. <pre></pre> problem

6. HPGL<->PostscriptPCL<->Postscript

7. GDSII<->PostScript<->HPGL translation pgms wanted

8. Troubles with <<fullscreen>>

9. >>> 9 0 % O F F <<<

10. <<<The BEST Secret Password>>>

11. <<<The VERY Hottest Password>>>

 

 
Powered by phpBB® Forum Software