Re: vs 2008 c++ access mysql database
Posted by:
oz oz
Date: November 06, 2010 04:17PM
here is vb code. i am new for mysql :-)
Imports MySql.Data.MySqlClient
Imports System.Data
Partial Class _Default
Inherits System.Web.UI.Page
Dim conn As MySqlConnection
Dim da As MySqlDataAdapter
Dim ds As New DataSet
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'connection string
conn = New MySqlConnection("server=localhost;uid=yourusername;pwd=yourpassword; database=test;")
conn.Open()
'Data adapter
da = New MySqlDataAdapter("select * from yourtableintestdatebase", conn)
'Dataset
da.Fill(ds, "yourtable")
'
GridView1.DataSource = ds.Tables("yourtable").DefaultView
GridView1.DataBind()
conn.Close()
End Sub
End Class
Subject
Views
Written By
Posted
1084
November 04, 2010 05:29PM
Re: vs 2008 c++ access mysql database
670
November 06, 2010 04:17PM
854
January 22, 2011 11:31PM
559
April 06, 2011 10:02PM
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.