Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hi...

 

im using web form in vb.net to retrieve data...the problem that i have is..there is an error to retrieve data from a database(sql server 2000)

 

sqlDataAdapter.fill(ds)

 

what should i do?? kindly reply pls...thx alot..

Posted

thx for replying..

yes...it seems correct...

 

but when i was trying to compile it, an error pop up and this line of code is highlighted....

may i know what happened?

 

one table is used in my dataset only ...how come?

Posted

thx....

here is my code in the component form...

 

SqlConnection1.Open()

SqlDataAdapter1.Fill(ds)

SqlConnection1.Close()

 

 

*****************************************

and this is my coding in a web form.

 

 

Imports System.Data.SqlClient

 

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

If Not IsPostBack Then

theComponent.PopulateDS(DsCustomers1)

DataGrid1.DataBind()

End If

End Sub

 

 

Private Sub DataGrid1_PageIndexChanged(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles DataGrid1.PageIndexChanged

DataGrid1.CurrentPageIndex = e.NewPageIndex

theComponent.PopulateDS(DsCustomers1)

DataGrid1.DataBind()

 

End Sub

 

****************************************

and the erro is attached in the file below...

thx for replying..

error for try3.txt

Posted

hi....

can u pls elaborate more?i dun get u..how can i do that?

is my connection to sql server valid??im using win 2000 advanced server and sql server 2000 as my database..

thx a million for giving attention....

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...