Forums

ASP

This topic is locked

Access and MYSQL

Posted 01 Feb 2003 00:00:03
1
has voted
01 Feb 2003 00:00:03 jacque jd posted:
I am changing servers soon and was wondering how I would change my databases from Access to mysql. I use MS Access to make my databases and ultradev to make connections and design my sites.
Do i have to change anycoding on my
ASP application.
I am very GREEN on MYSQL <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>
Im not real sure what to ask other than this so any info would be very helpful.
one more thing do i have to purchase this software:
Access-to-MySQL:
www.convert-in.com/acc2sql.htm
Thank you

Edited by - jhd on 01 Feb 2003 00:02:10

Replies

Replied 02 Feb 2003 01:56:58
02 Feb 2003 01:56:58 Jørgen Emerslund replied:
I used Access before at my site, but decided to turn to mysql for performance reasons.

The only two things I can remember having problems with is dates and boolean values in Access.

<ul><li>You don't really have boolean values in MySQL. What I did is using a byte datatype, with the values 1 and 0 for, respectivly, true and false. You'll need to go over your site and change this.</li><li>Dates is stored in another way in mysql than Access. Just make a sub-routine for converting between the two of them</li></ul>
Replied 02 Feb 2003 18:44:47
02 Feb 2003 18:44:47 jacque jd replied:
Did get the connection working and some page are pulling out from Mysql database,
But Some of them Getting this error message:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E09)
[TCX][MyODBC]You have an error in your SQL syntax near 'SELECT COUNT (*) FROM ADS WHERE ADS.CAT_ID = CATS.CAT_ID AND AD_APPROVED = 1 A' at line 1
/search.asp, line 32
anyidea.
Thank you
Replied 02 Feb 2003 19:29:23
02 Feb 2003 19:29:23 asp asp replied:
try something like, i assume you just want to count the approved adds...

SELECT Count (*) AS myTotal
FROM ADS
WHERE AD_APPROVED = '1'
Replied 02 Feb 2003 22:56:30
02 Feb 2003 22:56:30 jacque jd replied:
That didn't do it, when i switch from access toMysql, is my application and the sql statment has to be change?
Because other paging are giving me errors also.
But they all work fine with just access2000
I am using Dreamweaver MX
Thank you
Replied 03 Feb 2003 00:27:50
03 Feb 2003 00:27:50 asp asp replied:
have a look at this, if all you are doing is adding the number 1 in that table i would use SUM, are you trying to add this column??

www.aspfaq.com/show.asp?id=2326
Replied 03 Feb 2003 01:50:58
03 Feb 2003 01:50:58 jacque jd replied:
Thanks for your patient:
this my sql statment:
SELECT CATS.CAT_ID, CAT_NAME, CAT_IMAGE, (SELECT COUNT (*) FROM ADS WHERE ADS.CAT_ID = CATS.CAT_ID AND AD_APPROVED = 1 AND AD_EXPIRED &gt; DATE() ) AS TOTAL
FROM CATS
WHERE cat_name like 'varcat_name%'
ORDER BY CAT_NAME ASC

which is working fine with access but not with mysql
you think i need to change that stament.
the error for that script is:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E09)
[TCX][MyODBC]You have an error in your SQL syntax near 'SELECT COUNT (*) FROM ADS WHERE ADS.CAT_ID = CATS.CAT_ID AND AD_APPROVED = 1 A' at line 1

Thank you again

Reply to this topic