473,946 Members | 7,382 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.Net MySQL ODBC question

Hi all,

I've been trying to get ASP to work with MySQL using the MySQL ODBC
3.51 Driver. I can connect to the database fine but i'm having trouble
with parameters.
I've discovered I need to use '?' to delimit a paramter in the query
string rather than '@<paramname>'. if this is true, how do I handle
multiple parameters? e.g How would the command distinguish between
multiple paramters if they're all delimited by '?' rather than unique
names?

Any help would be greatly appreciated,

Paul

Apr 30 '06 #1
8 1590
Ge**********@gm ail.com wrote:
Hi all,

I've been trying to get ASP to work with MySQL using the MySQL ODBC
3.51 Driver. I can connect to the database fine but i'm having trouble
with parameters.
I've discovered I need to use '?' to delimit a paramter in the query
string rather than '@<paramname>'. if this is true, how do I handle
multiple parameters? e.g How would the command distinguish between
multiple paramters if they're all delimited by '?' rather than unique
names?

Any help would be greatly appreciated,

Paul


You simply add the parameters in the same order as they are in the query.
Apr 30 '06 #2
<Ge**********@g mail.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. .
Any help would be greatly appreciated,


You've posted in an ASP.NET newsgroup so, although you mention ASP in your
original post, I assume you actually mean ASP.NET...

If that is the case, I'm curious as to why on earth you're using ODBC rather
than a native .NET data provider...?
Apr 30 '06 #3

Mark Rae wrote:
<Ge**********@g mail.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. .
Any help would be greatly appreciated,


You've posted in an ASP.NET newsgroup so, although you mention ASP in your
original post, I assume you actually mean ASP.NET...

If that is the case, I'm curious as to why on earth you're using ODBC rather
than a native .NET data provider...?


The only way to use a MySQL DB with my current webspace provider
(parcom.net) is to use ODBC. My only other option is to use MS-SQL but
my webspace provider only supplies 50mb free, and then a monthly charge
per extra monthly charge.

Paul

May 1 '06 #4
Thanks for the quick answer.

Paul

May 1 '06 #5
<Ge**********@g mail.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. .
The only way to use a MySQL DB with my current webspace provider
(parcom.net) is to use ODBC. My only other option is to use MS-SQL but
my webspace provider only supplies 50mb free, and then a monthly charge
per extra monthly charge.


http://www.mysql.com/products/connector/net/

Simply copy MySql.Data.dll into the \bin folder of your ASP.NET app and
you're good to go.
May 1 '06 #6

Mark Rae wrote:
<Ge**********@g mail.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. .
The only way to use a MySQL DB with my current webspace provider
(parcom.net) is to use ODBC. My only other option is to use MS-SQL but
my webspace provider only supplies 50mb free, and then a monthly charge
per extra monthly charge.


http://www.mysql.com/products/connector/net/

Simply copy MySql.Data.dll into the \bin folder of your ASP.NET app and
you're good to go.


Thanks! I've been looking at the membership roleproviders and it seems
this functionality can only be used with a MS-SQL DB? I did try
downloading an ODBC version of one of these providers but it was too
unstable. This brings me to a question which I think I already know the
answer to (ie NO), would it ever be ok to use MS-SQL and MySQL on the
same application. Such as MS-SQL for the user tables (so using the
membership/role adapters) and MYSQL to store everything else? As stated
earlier, I have got a 50 mb MS-SQL 2005 db which should be more than
large enough if I store users alone.

Thanks,

Paul

May 1 '06 #7
<Ge**********@g mail.com> wrote in message
news:11******** *************@v 46g2000cwv.goog legroups.com...
Mark Rae wrote:
<Ge**********@g mail.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. .
> The only way to use a MySQL DB with my current webspace provider
> (parcom.net) is to use ODBC. My only other option is to use MS-SQL but
> my webspace provider only supplies 50mb free, and then a monthly charge
> per extra monthly charge.
http://www.mysql.com/products/connector/net/

Simply copy MySql.Data.dll into the \bin folder of your ASP.NET app and
you're good to go.


Thanks! I've been looking at the membership roleproviders and it seems
this functionality can only be used with a MS-SQL DB?


No idea...
This brings me to a question which I think I already know the
answer to (ie NO), would it ever be ok to use MS-SQL and MySQL on the
same application. Such as MS-SQL for the user tables (so using the
membership/role adapters) and MYSQL to store everything else?


There's no technical reason why you can't use more than one back-end RDBMS,
but you might wonder at the practicalities of doing so, especially if you're
using a DAL...
May 2 '06 #8
Mark Rae wrote:

This brings me to a question which I think I already know the
answer to (ie NO), would it ever be ok to use MS-SQL and MySQL on the
same application. Such as MS-SQL for the user tables (so using the
membership/role adapters) and MYSQL to store everything else?


There's no technical reason why you can't use more than one back-end RDBMS,
but you might wonder at the practicalities of doing so, especially if you're
using a DAL...


Its just an idea I was playing with. The asp membership/role providers
save a lot of coding, and after testing, they don't work effectively in
MySQL. For cost reasons I'm going with MySQL, and there is the
possibility of storing users in MS-SQL to allow the membership/role
providers to be integrated. It might get messy though, and this is what
worries me. I would only be using it for a personal project, so I might
just do it and see how it goes.

Paul

May 2 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
4845
by: Mr Dygi | last post by:
Hi, PHP 4.3.4 installed manually from package *.zip and Apache 2. I have a problem with this simple code: <?php $link = mysql_connect("127.0.0.1","","") or die("Could not connect: " . mysql_error()); echo "Connected successfully"; mysql_close($link);
15
2117
by: B. Pigman | last post by:
There have been many questions as to the viability of MySQL's assertion that it can dictate what constitutes a derived work in order to use the GPL against developers who don't wish their software GPL'd and force them to pay for a commercial license. According to the lawyers I've consulted, based on the letter of the GPL, here is the conclusion: Commercial users of MySQL opting for the GPL'd version are not compelled to release their...
4
2720
by: Chefry | last post by:
I'm trying to set up an off the shelf script and keep getting an error. My host set up the mysql on my site and I changed the variables I had to in the settings.php file but I keep getting the following errors Warning: mysql_pconnect(): Access denied for user: 'ODBC@localhost' (Using password: NO) in f:\wwwroot\professionalchef\Back\JobsOnline\mysql.php on line 121 Warning: mysql_pconnect(): Access denied for user: 'ODBC@localhost'...
2
1543
by: Shaun Rigby | last post by:
Hi Guys I currently have an active MySQL server running deveral databases for my business, they form the backbone of my web service, however i would like to create an application in C++ to create an application similar to this for store use. any information regarding this eg connecting to the database etc , please do not hesitate to email me
11
17604
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 to load making any kind linkage with my Access data virtually useless. I have the MySQL driver setup in as a USER DSN. The MySQL data is sitting out on a server and the Access database is running locally. The network connection is very...
2
4943
by: Beda Christoph Hammerschmidt | last post by:
MySQL, Access, ODBC, Replication Hello, i have a central mysql database that is accesed by multiple clients running MS Access with ODBC. This works fine if Access has a permanent connection to mysql. But now, i want MS Access to operate offline (e.g. on notebook in the
15
4675
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to communicate with a MySQL database table on a web server, from inside of my company's Access-VBA application. I know VBA pretty well but have never before needed to do this HTTP/XML/MySQL type functions.
5
4587
by: news.telia.net | last post by:
Hi! I have a question. I have installed php and mysql on an apache-server on windows and I can't connect to the server. I tried to create a database (since I am trying to learn howto). My manual said I should write this at the shell: c:\mysql\bin>mysqladmin -u root creare mindb I did this and got this error:
9
2480
by: Jacques Lebastard | last post by:
I have a problem writing PHP ODBC scripts that suit both MySQL and PostgreSQL. So far, the following syntaxes seem to apply to each database (this is an 'insert' example; the same differences apply to 'select commands): MySQL: INSERT INTO MyTable (col1, col2) VALUES ("value1","value2") PGSQL: INSERT INTO "MyTable" (col1, col2) VALUES ('value1','value2') I'd like to have a single syntax for both databases. Is this possible? Do I need...
0
10155
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9981
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11563
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9886
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8250
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7423
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4940
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3541
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.