Skip navigation links

MySQL Forums :: Connector/NET and C#, Mono, .Net :: ASP / VB.net Insert into MySQL Database


Advanced Search

ASP / VB.net 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("server=mysql13.easycgi.com; 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
DGGrid.databind()


End Sub

Options: ReplyQuote


Subject Written By Posted
ASP / VB.net Insert into MySQL Database ryan tyler 06/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.