thx for the reply but i'm looking at the "web form designer generated code"
and have found the oledbdataconnections and just want to modify this. What
i'm really having problem with is the syntax.
'
'OleDbConnection1
'
Me.OleDbConnection1.ConnectionString = "Jet OLEDB:Global Partial
Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database L" & _
"ocking Mode=0;Data
Source=""C:\Inetpub\wwwroot\db\database.mdb"";Jet OLEDB:Engine " & _
"Type=5;Provider=""Microsoft.Jet.OLEDB.4.0"";J et OLEDB:System
database=;Jet OLEDB:S" & _
"FP=False;persist security info=False;Extended
Properties=;Mode=Share Deny None;J" & _
"et OLEDB:Encrypt Database=False;Jet OLEDB:Create System
Database=False;Jet OLEDB" & _
":Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without
Replica Repair=Fal" & _
"se;User ID=Admin;Jet OLEDB:Global Bulk Transactions=1"
Data source - i need to change to a relative path like
server.mappath(/database/database.mdb) but everything i've tried keeps
bringing up syntax errors.
"Greg Burns" wrote:
Dim cn As OleDb.OleDbConnection
cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
Server.MapPath(ConfigurationSettings.AppSettings(" path"))) ' -->>>
c:\inetpub\wwwroot\global\data\project1.mdb
web.config...
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="path" value="/global/data/project1.mdb" />
</appSettings>
<system.web>
.... etc
HTH,
Greg
"john smithers" <jo**********@discussions.microsoft.com> wrote in message
news:8E**********************************@microsof t.com... I'm trying to modify the connection string made by the dataadapter wizard
to a relative path. My current datasource is this:
""C:\Inetpub\wwwroot\database\database.mdb""
How can i change so when its on the server it will look for the directory
"database" in the root of the virtual directory?
cheers