|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
VS.NET is Piece of Cake...
Hello...
I used to write ASP.NET App in Web Metrix. Now I've purchased VS.NET but I've got some hard time with it. Actually everything works fine but the problem is that it displays error in <filename>.aspx.vb at lines: 1. Dim objConnection as new OLEDBConnection (strConnection) 2. Dim objAdapter as new OLEDBDataAdapter (strSQL, objConnection) Error says that: 1. OLEDBConnection is not defined 2. OLEDBAdapter is not Defined I've also declared in <filename>.aspx page: <%@ import namespace = "System.Data" %> <%@ import namespace = "system.data.oledb" %> Would anyone plz help me! _____________ Thanks... Nauman Ahmed |
|
#2
|
|||
|
|||
|
I think the namespace and class name are case sensitive.
<%@ import namespace = "system.data.oledb" %> should be <%@ import namespace = "System.Data.OleDb" %> and Dim objConnection as new OLEDBConnection (strConnection) Dim objAdapter as new OLEDBDataAdapter (strSQL, objConnection) should be Dim objConnection as new OleDbConnection (strConnection) Dim objAdapter as new OleDbDataAdapter (strSQL, objConnection) Don't know is it the case for VB.NET. I'm using C#. Dennis Last edited by CharAznable : November 8th, 2002 at 02:02 PM. |
|
#3
|
|||
|
|||
|
Still
Hello Dennis...
VB.NET is not case sensative. Also I used to write the same code hundreds of time in Web Metrix and it works fine. But in VS.NET it doesnt work. Any other ideas... _____________ Thanks... Nauman Ahmed |
|
#4
|
|||
|
|||
|
Check project refrences
hi
try setting up your project refrences Take Care Kami |
|
#5
|
|||
|
|||
|
Is this a solution
Hello Kamran...
Nice to c u... Actually I've cut all the code in <filename>.aspx.vb file and paste it in <filename>.aspx within <script language="vb" runat="server"> tags... Now it works fine... no error displayed... but Intelisence didnt work i.e. When we write the objConnection. then window opens with all possible methods, prop etc didnt open... and what if I want to use the both <filename>.aspx.vb and <filename>.aspx... any sol... I've checked all the referances... Also I've included each and every referance but it didnt work... I dont know why strange things always happen to me.. _____________ Thanks... Nauman Ahmed |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > VS.NET is Piece of Cake... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|