PC Review


Reply
Thread Tools Rate Thread

.aspx.vb code syntax problem

 
 
slinky
Guest
Posts: n/a
 
      9th Aug 2007
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!!

 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWFuaXNoIEJhZm5h?=
Guest
Posts: n/a
 
      10th Aug 2007
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")
--
Hope this helps.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.



"slinky" wrote:

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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax problem with code WLMPilot Microsoft Excel Misc 1 15th Mar 2008 07:07 PM
problem with .aspx.vb code slinky Microsoft ASP .NET 13 10th Aug 2007 10:08 PM
.aspx.vb code syntax slinky Microsoft ASP .NET 10 10th Aug 2007 08:30 PM
problem with .aspx code slinky Microsoft ASP .NET 4 6th Aug 2007 05:16 AM
How to bring aspx code (in HTML view) to the aspx.vb code-behind? Paolo Pignatelli Microsoft ASP .NET 6 21st Feb 2005 01:55 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:07 PM.