andycharger
Well-known member
- Joined
- Apr 2, 2003
- Messages
- 152
Hi.
Im just taking my first steps with .net and im building a web based application. I need to hooc up to my sql server 2000 db from my application. I can see the database in the left hand window and the connection all works.
However,
I see that you use namespaces to import the classes.
Can someone tell me why the namespace is not "intellisensing" when I start typing "System.Data.SqlClient"?
I will include my longon page code to ask why I should put this.
If someone could provide a simple example as to how I get to my data, I would be forever grateful.
Andy
Im just taking my first steps with .net and im building a web based application. I need to hooc up to my sql server 2000 db from my application. I can see the database in the left hand window and the connection all works.
However,
I see that you use namespaces to import the classes.
Can someone tell me why the namespace is not "intellisensing" when I start typing "System.Data.SqlClient"?
I will include my longon page code to ask why I should put this.
If someone could provide a simple example as to how I get to my data, I would be forever grateful.
Andy
Code:
Public Class logon
Inherits System.Web.UI.Page
Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
Protected WithEvents TextBox2 As System.Web.UI.WebControls.TextBox
Protected WithEvents Label2 As System.Web.UI.WebControls.Label
Protected WithEvents Label1 As System.Web.UI.WebControls.Label
#Region " Web Form Designer Generated Code "
This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
CODEGEN: This method call is required by the Web Form Designer
Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Put user code to initialize the page here
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim da As sqlDataAdapter = New sqlDataAdapter()
Dim strUsername As String
Dim strPW As String
strUsername = TextBox1.Text
strPW = TextBox2.Text
Dim strOleDb As String
Dim cnOleDb As New OleDBConnection()
End Sub
End Class