Kind of a head scratcher...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: AndreMello (AndreMello.15x8ug_at_nospam.MSAccessForum.com)
Date: 05/07/04


Date: Fri, 7 May 2004 16:11:58 -0500


**NOTE**
My Windows 2000 is in Portuguese language because I am from Brazil, so
maybe some referenced Windows terms won't have the exact same name on
your Windows, so I apologize in advance

---
Hello everyone,
We have developed an Access System that dynamically configures an ODBC
for the user. That way when the user starts the application we don't
have to configure the ODBC properities all the time.
We use the function RegisterDatabase from DBEngine with these
attributes:
DBEngine.RegisterDatabase "SQLSERVERNAME", "SQL Server", True,
strAttributes
The last attribute is a String with this value:
strAttributes = "Database=Proteus, Description=" & strDescription & 
vbCr & "OemToAnsi=No" & _
vbCr & "Server=SBD_01" & _
vbCr & "Network=DBMSSOCN" & _
vbCr & "Trusted_Connection=No"
If you open the ODBC Icon on Control Panel -> Administrative Tools, the
first window is Users Data Source... you can also choose System Data
Source, File Data Source, etc.
The procedures that I mentioned before creates an ODBC on the USERS
Data Source on the ODBC configuration.
The User's Network library configuration will be TCP/IP and not named
pipes, because of the attribute Network=DBMSSOCN on that string, and
we'd like to keep it that way.
Do any of you know how to dynamically create the ODBC configuration on
the SYSTEM Data Source instead of users? 
It is most likely a small attribute somewhere on that code, but we
haven't been able to figure it out yet.
Thanks in advance!
------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/


Relevant Pages

  • Kind of a head scratcher...
    ... My Windows 2000 is in Portuguese language because I am from Brazil, ... We have developed an Access System that dynamically configures an ODBC ... Data Source on the ODBC configuration. ...
    (microsoft.public.access.queries)
  • Re: Kind of a head scratcher...
    ... Carl Prothman has all sorts of DSN-less connection strings at ... > My Windows 2000 is in Portuguese language because I am from Brazil, ... > We have developed an Access System that dynamically configures an ODBC ... > Data Source on the ODBC configuration. ...
    (microsoft.public.access.queries)
  • Re: Mail Mrege on Windows 98 not working
    ... My guess is that this is a problem where Word tries to use the ODBC text ... rename the data source, ... > I'm trying to do a mail merge on a windows 98 machine installed with Word ... > field delimiter, not sure if that might cause problems. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Mail Mrege on Windows 98 not working
    ... > driver to get its data and fails because ODBC does not recognise the tilde ... rename the data source, ... > delimiter for this file. ... >> I'm trying to do a mail merge on a windows 98 machine installed with Word ...
    (microsoft.public.word.mailmerge.fields)
  • Re: If then else containing value not at the end or in the beginni
    ... ODBC, and you have the necessary bits of the Jet database engine on ... b.open your mail merge main document and disconnect from the data source. ... Now you either need some VBA, or you need a DATABASE field. ... Sub MyConnect() ...
    (microsoft.public.word.mailmerge.fields)