.aspx.vb code syntax problem

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!!
 
G

Guest

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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top