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

User DSN 1

Status
Not open for further replies.

malk

MIS
Dec 12, 2000
84
US
I used the ActiveX report viewer from my VB application, and it works on my computer (where the reports were setup). The problem is when I run the app on another workstation, I have to go into the ODBC in the Windows Control panel, and add the data source to there list. Does anyone know how to avoid this problem either in CR 8 or VB?
 
The DSN has to be created at some point, either manually or as part of your application setup. Someone here may know the answer, but you might also try a forum more focused on application development. Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Brett,
I found an easier way to setup User DSN's with a VB app. First Reference the Microsoft Remote Data 2.0. THen have your program use the RDO to enter a new ODBC type, and update the registry. Here is what I did:

Dim strAttribs As String
' Build keywords string.
strAttribs = "Description=" _
& "Test" _
& Chr$(13) & "OemToAnsi=No" _
& Chr$(13) & "DefaultDir=c:\Test\DATA" _
& Chr$(13) & "Driverld=0x0000001b (27)" _
& Chr$(13) & "Fil=text" _
& Chr$(13) & "SafeTransactions=0x00000000 (0)"

' Create new registered DSN.
rdoEngine.rdoRegisterDataSource "Test", _
"Microsoft Text Driver (*.txt; *.csv)", True, strAttribs

This works on all workstations for setting up a User DSN in the registry and it appears in Control Panel, and works with Crystal Reports Data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top