Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
SQL
ce
clients
clustering
connect
datamining
datawarehouse
dts
fulltext
jdbcdriver
msde
mseq
newusers
notificationsvcs
odbc
olap
programming
replication
reportingsvcs
security
securitytools
server
setup
sqlxml.viewmapper
tools
xml
  
 
date: Wed, 26 Mar 2008 18:23:38 +0200,    group: microsoft.public.sqlserver.odbc        back       


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.
date: Wed, 26 Mar 2008 18:23:38 +0200   author:   Alexander N. Treyner

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us