Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASP.Net articles
Message
De
06/03/2002 09:33:56
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
ASP.Net articles
Divers
Thread ID:
00628966
Message ID:
00628966
Vues:
33
Hello all, I am new to web development, but would like to learn a little about it. I was reading Mike's ASP.NET database articles and was wondering where you actually put the code. From the code below that came from the first article, I assume the Page_Load method is found by clicking on WebForm1.aspx, but I don't understand where the 1st 3 lines go. Anywhere I put them inside the WebForm1 code page it underlines something revealing that I am not putting it in the correct place. I also need to know where to put the ending tag . I know I need to get a beginners book and I'm sorry to ask such trivial questions, but I appreciate the help. And Mike, if you read this, the articles are great. I wish I could have read them two months ago when I started developing my first VB.NET windows app.
< % ERROR: @ Import Namespace="System.Data"  % >
< % ERROR: @ Import Namespace="System.Data.Oledb"  % >
<script language="VB" runat="server">
Sub Page_Load(sender as object, e as eventargs)

Dim objConn as New OleDBConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=e:\sff\site\db\users.mdb")
objConn.Open()

Dim ds as Dataset = New DataSet()
Dim objAdapter as New OleDbDataAdapter("SELECT * FROM users", objConn)
Dim objCmdBld As New OleDbCommandBuilder(objAdapter)

objAdapter.Fill(ds, "users")

End Sub
</script>
Randy Belcher
AFG Industries, Inc.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform