J
JeffP@Laptop
datagrid1 has a single column contact
I'm getting an invalid datasource at...
Me.DataGrid1.DataSource = cmd
I don't want to use the methods here, I usually use SQLHelper
psuedo code: dim ds as new dataset = execute(.......
I just want to get my single colum populated.....
I'll work on more advanced stuff later....
'snipit...
Dim cmd As New OleDb.OleDbCommand
Dim cnn As OleDb.OleDbConnection
cnn = New
OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
"C:\Apps\R2M\Database;Extended Properties=DBASE
IV;")
cmd.CommandText = "select c1.* ,c2.* from c1 ,c2 where c1.accno
= c2.accno"
cmd.CommandType = CommandType.Text
cmd.Connection = cnn
cnn.Open()
'I chose this because it's there, perhaps another Excute Type
would be better.
cmd.ExecuteNonQuery()
cnn.Close()
'the following line casuses the noted error
Me.DataGrid1.DataSource = cmd
Me.DataGrid1.DataBind()
cnn.Dispose()
TIA
JeffP....
I'm getting an invalid datasource at...
Me.DataGrid1.DataSource = cmd
I don't want to use the methods here, I usually use SQLHelper
psuedo code: dim ds as new dataset = execute(.......
I just want to get my single colum populated.....
I'll work on more advanced stuff later....
'snipit...
Dim cmd As New OleDb.OleDbCommand
Dim cnn As OleDb.OleDbConnection
cnn = New
OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
"C:\Apps\R2M\Database;Extended Properties=DBASE
IV;")
cmd.CommandText = "select c1.* ,c2.* from c1 ,c2 where c1.accno
= c2.accno"
cmd.CommandType = CommandType.Text
cmd.Connection = cnn
cnn.Open()
'I chose this because it's there, perhaps another Excute Type
would be better.
cmd.ExecuteNonQuery()
cnn.Close()
'the following line casuses the noted error
Me.DataGrid1.DataSource = cmd
Me.DataGrid1.DataBind()
cnn.Dispose()
TIA
JeffP....