Hi,
Thanks for your reply, sorry I wasn't clearer. What I need to be able to do is easily grab data individually so that I can lay it wherever I like, so I could have a page that says
Hello [mysqldata]! How are you. I see you have eaten [mysqldata] pies today.
Also, I need to be able to write back to the database easily.
In PHP what I would do is call my data using a simple sql select statement
assign the data to variables like so
1 $query = mysql_query("SELECT * FROM MyTable WHERE ID = '1'");
2 $grab_results = mysql_fetch_row($query);
3 $Name = $grab_results[3];
4 $Pies_eaten = $grab_results[4];
then feed that information into say a HTML form:-
Name: <INPUT name=name value="<?PHP echo $Name; ?>">
Pies: <INPUT name=pies value="<?PHP echo $Pies_eaten; ?>">
-----
This is what I currently have (feeding into a DataGrid)...
<%@ Page Language="VB" debug="true" %>
<%@ Import Namespace = "System.Data" %>
<%@ Import Namespace = "MySql.Data.MySqlClient" %>
<script language="VB" runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim myConnection As MySqlConnection
Dim myDataAdapter As MySqlDataAdapter
Dim myDataSet As DataSet
Dim strSQL As String
Dim iRecordCount As Integer
myConnection = New MySqlConnection("server=localhost; userid=root; password=***; database=test; pooling=false;")
strSQL = "SELECT * FROM Names;"
myDataAdapter = New MySqlDataAdapter(strSQL, myConnection)
myDataSet = New Dataset()
myDataAdapter.Fill(myDataSet, "mytable")
MySQLDataGrid.DataSource = myDataSet
MySQLDataGrid.DataBind()
End Sub
</script>
<html>
<head>
<title></title>
</head>
<body>
<form runat="server">
<asp:DataGrid id="MySQLDataGrid" runat="server" />
</form>
</body>
</html>
-------
**EDIT: If I have the data fed into variables (as I am acustomed to with PHP) it should also be easy to feed the data back into an INSERT statement?