Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQLStringConnect()

Status
Not open for further replies.

insania

Technical User
Feb 11, 2004
53
IE
Hi,

I'm using the following code to connect to Goldmine 6 running on SQLServer:

lcDSNLess = "Driver={SQL Server};Server = BGR-APPS;Database = GOLDMINE_DATA; Uid=user; Pwd=password"

gnConnHandle = SQLSTRINGCONNECT(lcDSNLess)

When SQLStringConnect runs, the user sees an SQL Server Login prompt showing the following:

- A drop down, labelled "Server", which is blank
- A check box, labelled "Use Trusted Connection", which is unchecked.
- A text box, labelled "Login ID", which contains the user name.
- A text box, labelled "Password", which contains the password.
- An button, labelled "OK", which is disabled

If the user clicks on the drop down, they can select "BGR-APPS" from the list, at which point the "OK" button becomes enabled and they can log on successfully.

Ideally, I would like to avoid the user seeing the SQL Server Login prompt at all, but if that is not possible, I would at least like the drop down to be populated in the same way as the user name and password text boxes are, so that the user can simply click on "OK" to log on without having to select from the drop down.

I would have expected the code above to achieve this second aim, since "BGR-APPS" exists and is passed in the same way as the username and password, which do get populated.

Any help is much appreciated.

Jake

 
Try

Code:
lcDSNLess = "Driver={SQL Server};Server=BGR-APPS;Database=GOLDMINE_DATA;Uid=user;Pwd=password"

Note that I didn't left any space on the string

Gerardo Czajkowski
ltc.gif
 
That has sorted it - removing the spaces creates a connection without displaying the SQL Server Login screen, which is exactly what I wanted. Many thanks, Gerardo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top