473,324 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

In XML.....mysql connection string and queries

6
Hi everybody,


How to write the connection string and sql queries in the XML.

I use the mysql database.

I use the following connection string and query using asp.net with C#.

Connection String:

con=new OdbcConnection("Driver={MySQL ODBC 5.1 Driver};Server=VBNET4;Port=3306; Database=netmusk; User=root; Password=harsha;Option=3; Min Pool Size=5; Max Pool Size=60; Connect Timeout=2;");
con.Open();



Query:

try
{
con.Close();
con.Open();
cmd = new OdbcCommand("Select firstname,usertoolbarid,pass_word from user_table where firstname='" + txt_username.Text + "' and pass_word='" + txt_password.Text + "'", con);
dr = cmd.ExecuteReader();

while (dr.Read())
{
String getuname = dr.GetString(0);
String getloginid = dr.GetString(1);
String getpword = dr.GetString(2);
}
dr.Close();



Please help me


Thanks in Advance.

J. Mohan.
May 10 '08 #1
4 3086
jkmyoung
2,057 Expert 2GB
1. What are the results that you are getting now? What results are you expecting?

2. What is in your database now? Are you sure you're accessing the right tables?

3. Are you getting a particular error message? If so, could you post it?
May 12 '08 #2
jmohan
6
1. What are the results that you are getting now? What results are you expecting?

2. What is in your database now? Are you sure you're accessing the right tables?

3. Are you getting a particular error message? If so, could you post it?

Thanks for your reply,

Here are my clarifications,

(1)I need to save and retrieve data from mysql database using xml

(2)My datbase is mysql. Sure, I am accessing the right tables.

(3). No I am not getting any error message with this javascript. The connection is established and data is save and retrieved from the mysql database using the javascript.

I need to work with xml instead of javascript.

Please give me the suggestion,

Thanks in Advance,

J. Mohan.
May 12 '08 #3
jkmyoung
2,057 Expert 2GB
I need to work with xml instead of javascript.
This doesn't quite make sense.

XML is just a format. It doesn't specifically do things unless you define a language and processing rules for it, eg xslt. XQuery is a form of xml that is capable of handling the syntax of queries, but doesn't connect to the database for you.You can use javascript to get the output back as XML...

Define what XML application you're using, and then it might be possible to help.
May 12 '08 #4
jmohan
6
This doesn't quite make sense.

XML is just a format. It doesn't specifically do things unless you define a language and processing rules for it, eg xslt. XQuery is a form of xml that is capable of handling the syntax of queries, but doesn't connect to the database for you.You can use javascript to get the output back as XML...

Define what XML application you're using, and then it might be possible to help.
Hi jkmyoung,

I am developing a toolbar in the toolbar studio. The toolbar is located at internet explorer browser like yahoo, google toolbars.

Toolbar controls gets the functionality by using the javascript.

Toolbar has a dropdown list. Toolbar should get the data from the mysql database and the data should be added to the dropdown list.

Therefore, there is a need of mysql database connection and query statement to do the both job.

I am unable to do that both job using javascript. Therefore, I have planned to make the mysql database connection and sql queries statement using xml which is a platform independent for exchanging information. So, I asked you like that.

Could you please give me an example of the XML with javascript for making mysql database connection and saving and retrieving data using sql query statement.

Thank You,

J. Mohan
May 14 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
16
by: MLH | last post by:
Using MS Access, I have attached to MySQL servers in other states and other countries on the other side of my router. But when I use the MySQL ODBC driver 3.51 to connect to a MySQL server on my...
1
by: Dmitry Davletbaev | last post by:
Hi! I'm working on program that acts as MySQL client. After successful connection program send queries for a long time. When I stop server mysql_query return error (no surprise). But when I...
11
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time...
1
by: zMisc | last post by:
I am looking at using MySQL in my application (currently works with Access and SQL Server 2000). Is it possible to access MySQL database using ADO? What is the connection string for this? ...
1
by: Good Man | last post by:
Hi there I've noticed some very weird things happening with my current MySQL setup on my XP Laptop, a development machine. For a while, I have been trying to get the MySQL cache to work....
1
by: PowerLifter1450 | last post by:
I've been having a very rough time installinig mySQL on Linux. I have been following the instructions form here: http://www.hostlibrary.com/installing_apache_mysql_php_on_linux Everytime I get to...
4
by: Federico | last post by:
Hi everybody, I'm evaluating the possibility of using MySQL 5.0 as a database backend for an application we are doing and I'd like to have hardware requirements rough estimates and/or real world...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.