J
JEFF
There is most likely a better way to do what I am trying to do here so any
advice on a better solution would be greatly appreciated. I have a table of
events in an Access db. I want to get the eventid of record to feed to an
aspx page via QueryString. Here is what I am trying:
Dim cn As System.Data.OleDb.OleDbConnection
Dim cmd As System.Data.OleDb.OleDbDataAdapter
Dim ds As New System.Data.DataSet()
cn = New
System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;data
source=C:\MyApp\App_Data\spsi.mdb")
cmd = New System.Data.OleDb.OleDbDataAdapter("SELECT Events.ID
FROM(Events)WHERE (((Events.Title)="""" & MyTitle /", cn)
cn.Open()
Try
cmd.Fill(ds)
Catch
End Try
cn.Close()
So, now I have this dataset that has 1 row and one column that contains an
integer number. How can I reference that as a string?
Also, how do I encapsulate my MyTitle in quotes?
Thanks in advance!
Jeff
advice on a better solution would be greatly appreciated. I have a table of
events in an Access db. I want to get the eventid of record to feed to an
aspx page via QueryString. Here is what I am trying:
Dim cn As System.Data.OleDb.OleDbConnection
Dim cmd As System.Data.OleDb.OleDbDataAdapter
Dim ds As New System.Data.DataSet()
cn = New
System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;data
source=C:\MyApp\App_Data\spsi.mdb")
cmd = New System.Data.OleDb.OleDbDataAdapter("SELECT Events.ID
FROM(Events)WHERE (((Events.Title)="""" & MyTitle /", cn)
cn.Open()
Try
cmd.Fill(ds)
Catch
End Try
cn.Close()
So, now I have this dataset that has 1 row and one column that contains an
integer number. How can I reference that as a string?
Also, how do I encapsulate my MyTitle in quotes?
Thanks in advance!
Jeff