VB .net connectionString Crystal Rpt XI - TechRepublic
General discussion
March 31, 2005 at 03:29 AM
eltaria

VB .net connectionString Crystal Rpt XI

by eltaria . Updated 21 years, 3 months ago

Hi guys, I need some help with CR XI and VB .net

My application retrieves data from a Interbase6 DB, and I used the following ConnectionString in the .rpt file

Driver={XTG Systems Interbase6 ODBC driver};DB=IPAdd:C:\DBFile.gdb;UID=ID;PWD=UPass

However, there is the option that the database can be relocated to another location via the VB program that we’re developing now.

IN VB .net the connection string should look like this

Driver={XTG Systems Interbase6 ODBC driver};DB=” & IPAdd & “:” & DatabaseName & “;UID=” & UName & “;PWD=” & UPass

The problem is, I don’t know how to pass this information successfully to crystal report softcoded.

From what I’ve manage to google, this is the way to connect to a DB

dim crConnectionInfo as New ConnectionInfo
With crConnectionInfo
.servername = servername
.databasename = databasename
.userid = uid
.password = pwd
End With

based on the suggestion above, i tried

With crConnectionInfo
.servername = “192.168.0.111” Or “Localhost” ‘(IP of the server)
.databasename = “C:\Databasefile.gdb”
.userid = “me”
.password = “123”
End With

with no success. So I’m really hoping someone can help me out here. Googling only returned information regarding vb6/CR 8/9 and not much on vb.net and cr XI

Thanks in advance !

This discussion is locked

All Comments