sin Posted January 11, 2004 Posted January 11, 2004 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.. Quote
The One Who Was Posted January 11, 2004 Posted January 11, 2004 Sin: The line of code you provided appears correct. What is the error you are receiving, and does your dataset contain more than 1 table with a relation? Quote ~~ The One Who Was ~~
sin Posted January 11, 2004 Author Posted January 11, 2004 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? Quote
samsmithnz Posted January 11, 2004 Posted January 11, 2004 Can you provide us with a bit more code and the error message please. Quote Thanks Sam http://www.samsmith.co.nz
sin Posted January 14, 2004 Author Posted January 14, 2004 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 Quote
Administrators PlausiblyDamp Posted January 14, 2004 Administrators Posted January 14, 2004 It looks like the ASPNET account doesn't have permisions to the database, you will need to grant DB permissions to GRACE\ASPNET to allow the server access to the DB. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
sin Posted January 19, 2004 Author Posted January 19, 2004 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.... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.