Unix Technical Forum

ODBC DSN created via script is not visible in "ODBC Datasource Administrator"

This is a discussion on ODBC DSN created via script is not visible in "ODBC Datasource Administrator" within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> Hi, I have used script, specified below, to add ODBS DSN After I executed this script, the DSN was ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > MS SQL ODBC

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-28-2008, 04:40 AM
Alexander N. Treyner
 
Posts: n/a
Default ODBC DSN created via script is not visible in "ODBC Datasource Administrator"

Hi,

I have used script, specified below, to add ODBS DSN
After I executed this script, the DSN was created and my application
used it, BUT - this DSN was not visible in "ODBC Datasource
Administrator". Furthermore , now if I add another DSN via "ODBC
Datasource Administrator", I can not see it there. It work, it appear in
registry, but not visible in "ODBC Datasource Administrator".
Please, help to find out how to fix it.

' *********** ODBC *********************
strKeyPath = "SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources"
strODBCname = "localcrm"
strValue = "SQL Server"
objReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strODBCname,strValue

strKeyPath = "SOFTWARE\ODBC\ODBC.INI\"+strODBCname
objReg.CreateKey HKEY_CURRENT_USER,strKeyPath

strValueName = "Database"
strValue = "MSCRM_MSDE"
objReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue

strValueName = "Driver"
strValue = "C:\WINDOWS\System32\SQLSRV32.dll"
objReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue

strValueName = "Server"
strValue = strComputerName+"\crm"
objReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue

strValueName = "Trusted_Connection"
strValue = "Yes"
objReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue


I'm working on Windows XP SP2, with all last updates and patches.

Thanks,

Alex.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:18 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com