473,657 Members | 2,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MySQL command issues with an ADO Recordset

Hi All

I know you will probably say that I should use MS SQL Server DBs with ASP,
but my MySQL and ASP combo works and is affordable for me and up until now
didn't give me any grief until recently.

In essence, the following MySQL query commands cause my ASP to generate a
Type Mismatch error when I try to response.write the result of the query
fields:

Query 1

CONCAT(PICFILEW IDTH,' x ',PICFILEHEIGHT )

I call this query result into a dynamically-created array from a recordset
object, ie arrSQLData (the array) = oRSv.GetRows() (the recordset object),
but when I call say arrSQLData(0,0) it generates the type mismatch.

This used to work fine in the MySQL v4 something that had the crappy
installer, but since they made the new installer (and some other mods) it
causes this problem.

I've checked the MySQL site and it says that the above, which is an int, ' x
', another int is fine, but something in ASP doesn't like the result it
sends back.

Done a straight query from SQLyog and that displays it OK.

Query 2

IFNULL((sp.RRPT AX/sp.RRPNET),'0.0 0')

same again this generates a type mismatch when it used to work fine.
Obviously the command puts in 0.00 if the tax and net values are null, but
this doesn't work now. It generates a type mismatch.

Has anybody had this problem and fixed it?

Thanks

Laphan


Nov 2 '06 #1
2 4397
Laphan wrote:
Hi All

I know you will probably say that I should use MS SQL Server DBs with ASP,
but my MySQL and ASP combo works and is affordable for me and up until now
didn't give me any grief until recently.

In essence, the following MySQL query commands cause my ASP to generate a
Type Mismatch error when I try to response.write the result of the query
fields:

Query 1

CONCAT(PICFILEW IDTH,' x ',PICFILEHEIGHT )

I call this query result into a dynamically-created array from a recordset
object, ie arrSQLData (the array) = oRSv.GetRows() (the recordset object),
but when I call say arrSQLData(0,0) it generates the type mismatch.

This used to work fine in the MySQL v4 something that had the crappy
installer, but since they made the new installer (and some other mods) it
causes this problem.

I've checked the MySQL site and it says that the above, which is an int, ' x
', another int is fine, but something in ASP doesn't like the result it
sends back.

Done a straight query from SQLyog and that displays it OK.

Query 2

IFNULL((sp.RRPT AX/sp.RRPNET),'0.0 0')

same again this generates a type mismatch when it used to work fine.
Obviously the command puts in 0.00 if the tax and net values are null, but
this doesn't work now. It generates a type mismatch.

Has anybody had this problem and fixed it?

Thanks

Laphan

try:

CONCAT(cast(PIC FILEWIDTH as varchar),' x ',cast(PICFILEH EIGHT as varchar))

Basically you are trying to use a function (CONCAT) that is character-datatype
based with an integer datatype.
--
Michael Austin.
:)
Nov 4 '06 #2
Thanks Michael

Do you have any ideas as to what is happening with the ifnull?

Rgds

Laphan

"Michael Austin" <ma*****@firstd basource.comwro te in message
news:p1******** *******@newssvr 11.news.prodigy .com...
Laphan wrote:
Hi All

I know you will probably say that I should use MS SQL Server DBs with ASP,
but my MySQL and ASP combo works and is affordable for me and up until now
didn't give me any grief until recently.

In essence, the following MySQL query commands cause my ASP to generate a
Type Mismatch error when I try to response.write the result of the query
fields:

Query 1

CONCAT(PICFILEW IDTH,' x ',PICFILEHEIGHT )

I call this query result into a dynamically-created array from a recordset
object, ie arrSQLData (the array) = oRSv.GetRows() (the recordset object),
but when I call say arrSQLData(0,0) it generates the type mismatch.

This used to work fine in the MySQL v4 something that had the crappy
installer, but since they made the new installer (and some other mods) it
causes this problem.

I've checked the MySQL site and it says that the above, which is an int, '
x
', another int is fine, but something in ASP doesn't like the result it
sends back.

Done a straight query from SQLyog and that displays it OK.

Query 2

IFNULL((sp.RRPT AX/sp.RRPNET),'0.0 0')

same again this generates a type mismatch when it used to work fine.
Obviously the command puts in 0.00 if the tax and net values are null, but
this doesn't work now. It generates a type mismatch.

Has anybody had this problem and fixed it?

Thanks

Laphan

try:

CONCAT(cast(PIC FILEWIDTH as varchar),' x ',cast(PICFILEH EIGHT as varchar))

Basically you are trying to use a function (CONCAT) that is
character-datatype
based with an integer datatype.
--
Michael Austin.
:)
Nov 9 '06 #3

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

Similar topics

0
3517
by: Lenz Grimmer | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, MySQL 4.0.14, a new version of the popular Open Source/Free Software Database, has been released. It is now available in source and binary form for a number of platforms from our download pages at http://www.mysql.com/downloads/ and mirror sites.
0
1569
by: Petre Agenbag | last post by:
Hi List Been trying to help out with this problem on a SunOS5.8 box running 3.23.56 It experiences periodic lockups of mysql. It does not seem that this server has a my.cnf file for mysql, and I'm not sure if that matters (what are the defaults mysql use when it cannot find the .cnf file?) Anyway, I have asked for any help in making a my.cnf file in other
0
1222
by: M.C. Scheffers | last post by:
Hello all, I'm developing an VB application which uses the SAX parser and ADO VB to insert.update data in in MySQL. The perormance is very bad. If I use the same data and insert/update to a MS Access database it takes 14 minutes. But using MySQL it takes about 5 hours! Here's the piece of code which takes the most time. Does anyone have an explanation for this? Regards, --
4
11495
by: MLH | last post by:
I am having failures processing the following command and I wonder if you can tell me what I must do in order to have success. When I try to run source mysql_dump.sql.txt ==> it is a problem for me. 1) I put the file in /home/mlh/public_html/credifree/sql_script/. 2) I made that directory my current directory 3) I typed mysql and pressed ENTER 4) I then typed source mysql_dump.sql.txt and pressed ENTER A bunch of error...
11
17551
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...
9
2296
by: laredotornado | last post by:
Hello, I am tasked with converting an MsAccess db to a MySQL 4 db in a Linux environment. Can anyone recommend any good freeware/scripts to help me do this? Thanks, - Dave
1
4844
by: jrs_14618 | last post by:
Hello All, This post is essentially a reply a previous post/thread here on this mailing.database.myodbc group titled: MySQL 4.0, FULL-TEXT Indexing and Search Arabic Data, Unicode I was wondering if anybody has experienced the same issues
1
13675
by: marcfischman | last post by:
Please help. I have a website running on a linux/apache/mysql/php server. I receive about 8,000-10,000 visitors a day with about 200,000 to 300,000 page views. The server is a RedHat Linux server running PHP 5.x, MySQL 5.x, Apache 2.x We have been suffering from a number of performance issues. Our hosting company has set our max connections to 100, and we are using persistent connections in PHP. At times the mysqld process takes 100%...
8
3877
by: The Natural Philosopher | last post by:
This is so weird. What I am trying to do is to upload files and stuff them in a mysql database. Everything works except the file content is zero. using the load_file command from mysql command line as 'root' works and i can download the inserted file ok.
0
8742
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8518
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
8621
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7354
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...
0
5643
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();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
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
2
1971
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.