Wednesday, March 7, 2012

Programmatically Adding ADO.NET Connections

I can't find any documentation on the connection string for creating ADO.NET connections.

I am displaying a report in a viewer. It is connected to a wrapper DLL through an ADO.NET connection using the properties:
File Path
Class Name
Dataset Names

I'm having trouble accessing these to change them at runtime.

I've tried something like:
rpt.database:Tables(1):ConnectionProperties("File Path") = "c:\..."

No luck. Crystal doesn't have much documentation on this method. Any takers?Nevermind. Got it.

I was able to override the path of my DLL at runtime using the syntax:

report.database.tables(1).ConnectionProperties("File Path").Value = "c:\blah"

seems to be working.

No comments:

Post a Comment