deployment: api for setting connection properties ?

S

SteveM

I have built an MSDE adp project that I want to create an
MSI installation package for.

I know how to discover the machine name using VBA, but
don't know how to set the server name property in an un-
attended way in the "Data Link Properties" box

Steve
 
V

Vadim Rapp

Hello SteveM:
You wrote in conference microsoft.public.access.adp.sqlserver on Mon, 23
Feb 2004 20:04:28 -0800:

S> I have built an MSDE adp project that I want to create an
S> MSI installation package for.

S> I know how to discover the machine name using VBA, but
S> don't know how to set the server name property in an un-
S> attended way in the "Data Link Properties" box

Set it to (local)


Vadim
 
S

SteveM

I was told that it is better to distribute the app with
its own named instance ... therefore I need to get the
machine name .... Is this the best way to get the machine
name ???

Declare Global function for WinAPI:


Private Declare Function GetComputerNameAPI
Lib "kernel32" Alias "GetComputerNameA" _
(ByVal lpBuffer As String, nSize As Long) As Long

-----------------------------

then run it:

Function GetComputerName() As String
' Set or retrieve the name of the computer.
Dim strBuffer As String
Dim lngLen As Long

strBuffer = Space(255 + 1)
lngLen = Len(strBuffer)
If CBool(GetComputerNameAPI(strBuffer, lngLen)) Then
GetComputerName = Left$(strBuffer, lngLen)
Else
GetComputerName = ""
End If



-----Original Message-----
Hello SteveM:
You wrote in conference
microsoft.public.access.adp.sqlserver on Mon, 23
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top