ASP / Insert into MySQL Database
Posted by: ryan tyler
Date: June 19, 2007 02:35AM

I have tried many scripts and cannot insert any data into my database, a working script would be great:

This is how I am selecting data which works fine:


Sub GetNews()

Dim myConnection As MySqlConnection
Dim myDataAdapter As MySqlDataAdapter
Dim myDataSet As DataSet

Dim strSQL As String
Dim iRecordCount As Integer

myConnection = New MySqlConnection("; user id=xxx; password=xxx; database=xxx; pooling=false;")

strSQL = "SELECT ID, headline FROM News where Cat='General' order by dateposted desc LIMIT 4"

myDataAdapter = New MySqlDataAdapter(strSQL, myConnection)
myDataSet = New Dataset()
myDataAdapter.Fill(myDataSet, "news")

Dim clientview As New DataView(myDataSet.Tables("news"))

DGGrid.DataSource = clientview

End Sub

Options: ReplyQuote

Written By
ASP / Insert into MySQL Database
June 19, 2007 02:35AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.