hi guys , i m stuck with getting data using data grid , i used this code , but
dnt know where erroe is :
Sub DataGrid1_SelectedIndexChanged(sender As Object, e As EventArgs)
End Sub
Function vbdata() As System.Data.IDataReader
Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB
Services=-4; Data Source=C:\db1.mdb" Dim dbConnection As
System.Data.IDbConnection = New
System.Data.OleDb.OleDbConnection(connectionString)
Dim queryString As String = "SELECT [Table1].* FROM [Table1]" Dim dbCommand As
System.Data.IDbCommand = New System.Data.OleDb.OleDbCommand
dbCommand.CommandText = queryString dbCommand.Connection = dbConnection
dbConnection.Open Dim dataReader As System.Data.IDataReader =
dbCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection) Return
dataReader
End Function
sub Page_Load(sender as object , e as EventArgs) dataGrid1.dataSource=vbdata()
dataGrid1.DataBind()
End Sub
dbCommand.Connection = dbConnection
Line 22: dbConnection.Open
Line 23: Dim dataReader As System.Data.IDataReader =
dbCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
Line 24:
System.Data.OleDb.OleDbException: Could not find file 'C:\db1.mdb'.
---------------------------------
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search. Learn more.
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/