Alter Crystal Report9.0 DSN in VB6.0
Hi All,
I want to alter the ff DSN settings for Crystal9.0 files in visual basic6.0 at run time .
Database,Password,User Id.
Currently I have the ff snippet which doesnt work,it brings the details in the database with which i created the files
For Each crxDatabaseTable In SourceReport.Database.Tables
lstrLocation = crxDatabaseTable.Location
crxDatabaseTable.ConnectionProperties.DeleteAll
crxDatabaseTable.ConnectionProperties.Add "Integrated Security ", 0
crxDatabaseTable.ConnectionProperties.Add "DSN", "DSN"
crxDatabaseTable.ConnectionProperties.Add "Database","Database"
crxDatabaseTable.ConnectionProperties.Add "User ID", "User Id"
crxDatabaseTable.ConnectionProperties.Add "Password", "Password"
crxDatabaseTable.ConnectionProperties.Add "Owner", "dbo"
crxDatabaseTable.ConnectionProperties.Add "Table Schema", "dbo"
crxDatabaseTable.ConnectionProperties.Add "Table Owner", "dbo"
lstrLocation = "Initial Catalog" & "." & "dbo"
'crxDatabaseTable.Location = lstrLocation
Next crxDatabaseTable
Nii Darko Darkoh
|