D
daub815
In Access, the SQL statement works, but using VB.NET it doesn't. I
think its able to create a connection because its not giving me an
error, but it never returns anything. Could someone let me know what I
could be doing wrong? Thanks.
Dim strConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\inetpub\wwwroot\csc245\Project\dvd.mdb;"
Dim strCategory As String = rblCategory.SelectedValue
Dim strSQL As String
Dim theConnection As New OleDbConnection
Dim theCommand As New OleDbCommand
strSQL = "Select * From DVD;"
theConnection = New OleDbConnection(strConnection)
theConnection.Open()
theCommand = New OleDbCommand(strSQL, theConnection)
Response.Write(strSQL)
Response.Write(theCommand.ExecuteNonQuery)
theConnection.Close()
think its able to create a connection because its not giving me an
error, but it never returns anything. Could someone let me know what I
could be doing wrong? Thanks.
Dim strConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\inetpub\wwwroot\csc245\Project\dvd.mdb;"
Dim strCategory As String = rblCategory.SelectedValue
Dim strSQL As String
Dim theConnection As New OleDbConnection
Dim theCommand As New OleDbCommand
strSQL = "Select * From DVD;"
theConnection = New OleDbConnection(strConnection)
theConnection.Open()
theCommand = New OleDbCommand(strSQL, theConnection)
Response.Write(strSQL)
Response.Write(theCommand.ExecuteNonQuery)
theConnection.Close()