Pool Table Data

Posted in Uncategorized by admin on February 16, 2009 No Comments yet

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in /home/stevema5/public_html/cueproject.com/wp-content/plugins/affiliate-mage/classes/amazon.class.php on line 1

Thanks for visiting and welcome to our site!
We hope you will find the Pool Table Data information that you seek.
We welcome you to browse our website to see if there is something in particular you are looking for.


We”ve included some information on each page for your reading.
Pool Table Data

How to read a MySQL table using ASP.NET 2.0?

I can’t believe how hard it is to find something this simple. All I want to do is code a page where I can type a username and password and read a table to see if the user exists and the password is correct. I know I can do this with the built-in membership classes of ASP.NET 2.0 but all I want is to retrieve the value of a field of a MySQL database. This is the code I got to work so far:

<%@ Import Namespace="mysql.data.MySQLCli... %>
<%@ Page Language="VB" %>
<%
Dim conn As MySqlConnection
Dim da As MySqlDataAdapter
Dim cb As MySqlCommandBuilder
Dim connStr As String = "server=mysqrver.myisp.com;u... id=myuser; password=mypassword; database=mydatabase; pooling=false"
conn = New MySqlConnection(connStr)
conn.Open()
Response.Write("Connection opened")
conn.Close()
%>

Could you please give me an example of how to read from a table. No datagrids or anything like that please.

Which MySql native .net provider are you using?
The 2 most popular ones are:
ByteFX.Data: http://www.bytefx.com/dotdata.aspx
CoreLabs: http://www.crlab.com/

This code should work on both but you still need to use the proper Using/Import for the correct namespace:

After succesfully opening the connection:

conn.Open();
MySqlCommand cmd = new MySqlCommand(“SELECT * FROM Users WHERE Pwd = ‘” + txtPassword.Text + “‘”)
cmd.Connection = conn;
MySqlDataReader reader = cmd.ExecuteReader();
while (reader.Read()) {
Response.WriteLine(
reader["UserId"].ToString());
Response.WriteLine(
reader["Pwd"].ToString());
}

conn.Close();

Another great place to shop for Pool Table Data products is Amazon. They have more than just books!




Thanks for visiting!