.aspx.vb code syntax problem

  • Thread starter Thread starter slinky
  • Start date Start date
S

slinky

I'm making a OLE DB connection in code and was wondering if anyone
could identify what the syntax errors would be in this just as it is
pasted (I tried putting & _ at the end of the first line and that
only brought up other errors):

New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & Server.MapPath(~/App_Data/Lowes.mdb) & ";" & _
"Initial Catalog=Assets;Integrated Security=SSPI")


Thanks!!
 
Hi,
Below code is working perfectly well in my machine:
Dim conn As OleDbConnection = New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data " & _
"Source=" & Server.MapPath("~/App_Data/Lowes.mdb") & ";" & _
"Initial Catalog=Assets;Integrated Security=SSPI")
 
Back
Top