Note that there are some explanatory texts on larger screens.

plurals
  1. POoRecordset in ASP.NET mySQL
    text
    copied!<p>I have this mySQL code that connects to my server. It connects just fine:</p> <pre><code> Dim MyConString As String = "DRIVER={MySQL ODBC 3.51 Driver};" &amp; _ "SERVER=example.com;" &amp; _ "DATABASE=xxx;" &amp; _ "UID=xxx;" &amp; _ "PASSWORD=xxx;" &amp; _ "OPTION=3;" Dim conn As OdbcConnection = New OdbcConnection(MyConString) conn.Open() Dim MyCommand As New OdbcCommand MyCommand.Connection = conn MyCommand.CommandText = "select * from userinfo WHERE emailAddress = '" &amp; theUN &amp; "'"" MyCommand.ExecuteNonQuery() conn.Close() </code></pre> <p>However, i have an old Classic ASP page that uses "oRecordset" to get the data from the mySQL server:</p> <pre><code> Set oConnection = Server.CreateObject("ADODB.Connection") Set oRecordset = Server.CreateObject("ADODB.Recordset") oConnection.Open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=example.com; PORT=3306; DATABASE=xxx; USER=xxx; PASSWORD=xxx; OPTION=3;" sqltemp = "select * from userinfo WHERE emailAddress = '" &amp; theUN &amp; "'" oRecordset.Open sqltemp, oConnection,3,3 </code></pre> <p>And i can use oRecordset as follows:</p> <pre><code> if oRecordset.EOF then.... </code></pre> <p>or</p> <pre><code> strValue = oRecordset("Table_Name").value </code></pre> <p>or</p> <pre><code> oRecordset("Table_Name").value = "New Value" oRecordset.update </code></pre> <p>etc...</p> <p>However, for the life of me, i can not find any .net code that is similar to that of my Classic ASP page!!!!!</p> <p>Any help would be great! :o)</p> <p>David</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload