Subject: DataGrid with access connection
Posted By: Sindhuja Post Date: 1/21/2006 2:59:32 AM
I have placed a datagrid on my form...and i have written the following code on pageload event...

 Dim strconn As String = "Provider=Microsoft.Jet.OLEDB.4.0;datasource=D:\vb.net\db1.mdb"
 Dim strsql As String = "SELECT * FROM cust_details"

  Dim dbconn As New OleDb.OleDbConnection(strconn)
  Dim cmd As New OleDb.OleDbCommand(strsql, dbconn)
  dbconn.Open()

DataGrid1.DataSource = cmd.ExecuteReader(CommandBehavior.CloseConnection)
DataGrid1.DataBind()

When i run this page i am getting the following error

"System.Data.OleDb.OleDbException: Could not find installable ISAM.
Its saying the database is closed
"


Pls do help me


Go to topic 38981

Return to index page 389
Return to index page 388
Return to index page 387
Return to index page 386
Return to index page 385
Return to index page 384
Return to index page 383
Return to index page 382
Return to index page 381
Return to index page 380