473,320 Members | 2,122 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,320 software developers and data experts.

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 1573
Ge**********@gmail.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**********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.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**********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.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**********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.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**********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.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**********@gmail.com> wrote in message
news:11*********************@v46g2000cwv.googlegro ups.com...
Mark Rae wrote:
<Ge**********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.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
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: " ....
15
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...
4
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...
2
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...
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...
2
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...
15
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...
5
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...
9
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.