ASP.Net MySQL ODBC question

G

Gef.Mongoose

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
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

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.
 
M

Mark Rae

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...?
 
G

Gef.Mongoose

Mark said:
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
 
M

Mark Rae

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.
 
G

Gef.Mongoose

Mark said:
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
 
M

Mark Rae

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...
 
G

Gef.Mongoose

Mark said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top