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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with SetLogOnInfo... 1

Status
Not open for further replies.

dattero

Technical User
Mar 5, 2001
8
0
0
IT
I'm a C++ programme and I use this function (SetLogOnInfo) to log on on the server runtime:

CRAXDRT::IDatabaseTablesPtr tables = pReport->Database->GetTables();

for ( i = 1; i <= tables->Count; i++) {
tables->GetItem(i)->SetLogOnInfo(strServer,strDataBase,strUserId,strPasswd);
}

I don't have the servername, but I have the DSN of the database (SQL Server).

How i can configure SetLogInfo without the name of Server, only with the ODBC??

Thanks...

Marco
 
If you pass the DSN, you can skip the servername parameter (from VB anyway):

Report1.Database.Tables.Item(1).SetLogOnInfo &quot;DSN Name Here&quot;, , &quot;user id&quot;,&quot;password&quot; Brian J. Alves
Terrier Consulting, Inc.
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top