P
pooba53
Posted this to vb.crystal and received no response.
----------------------------------------------------------------------------
I'm using VS 2003 and VB .NET along with the embedded version of
Crystal Reports. When I build and deploy my application, the Access db
that I use is stored in the directory containing the executable that
launches my program.
So that my application knows to find the access db in the same
directory as the executable when I ship the application, I use the
following in my connection string:
AppBase = AppDomain.CurrentDomain.BaseDirectory & "data.mdb"
Then I do this:
' Update our connection string
Me.OleDbConnection2.ConnectionString = "Jet OLEDB:Global
Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDBatabase L" & _
"ocking Mode=1;Data Source=" & AppBase & ";Jet OLEDB:Engine
Type=5;Provider=""Mic" & _
"rosoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet
OLEDB:SFP=False;persist sec" & _
"urity info=False;Extended Properties=;Mode=Share Deny
None;Jet OLEDB:Encrypt Dat" & _
"abase=False;Jet OLEDB:Create System Database=False;Jet
OLEDBon't Copy Locale o" & _
"n Compact=False;Jet OLEDB:Compact Without Replica
Repair=False;User ID=Admin;Jet" & _
" OLEDB:Global Bulk Transactions=1"
This works fine for my application...no problems.
However, I need to do the same for Crystal Reports so that it too
knows of the db location in a deployed application.
I cannot find in my code where the CR connection string is so I can
modify it in my code. How do I accomplish a modification of the CR db
connection string (at runtime?)?
Thanks a ton!
-Dan
----------------------------------------------------------------------------
I'm using VS 2003 and VB .NET along with the embedded version of
Crystal Reports. When I build and deploy my application, the Access db
that I use is stored in the directory containing the executable that
launches my program.
So that my application knows to find the access db in the same
directory as the executable when I ship the application, I use the
following in my connection string:
AppBase = AppDomain.CurrentDomain.BaseDirectory & "data.mdb"
Then I do this:
' Update our connection string
Me.OleDbConnection2.ConnectionString = "Jet OLEDB:Global
Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDBatabase L" & _
"ocking Mode=1;Data Source=" & AppBase & ";Jet OLEDB:Engine
Type=5;Provider=""Mic" & _
"rosoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet
OLEDB:SFP=False;persist sec" & _
"urity info=False;Extended Properties=;Mode=Share Deny
None;Jet OLEDB:Encrypt Dat" & _
"abase=False;Jet OLEDB:Create System Database=False;Jet
OLEDBon't Copy Locale o" & _
"n Compact=False;Jet OLEDB:Compact Without Replica
Repair=False;User ID=Admin;Jet" & _
" OLEDB:Global Bulk Transactions=1"
This works fine for my application...no problems.
However, I need to do the same for Crystal Reports so that it too
knows of the db location in a deployed application.
I cannot find in my code where the CR connection string is so I can
modify it in my code. How do I accomplish a modification of the CR db
connection string (at runtime?)?
Thanks a ton!
-Dan