Professional Web Applications Themes

MySQL command issues with an ADO Recordset - MySQL

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(PICFILEWIDTH,' 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 ...

  1. #1

    Default 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(PICFILEWIDTH,' 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.RRPTAX/sp.RRPNET),'0.00')

    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




    Laphan Guest

  2. #2

    Default Re: MySQL command issues with an ADO Recordset

    Laphan wrote:
     
    try:

    CONCAT(cast(PICFILEWIDTH as varchar),' x ',cast(PICFILEHEIGHT as varchar))

    Basically you are trying to use a function (CONCAT) that is character-datatype
    based with an integer datatype.


    --
    Michael Austin.
    :)
    Michael Guest

  3. #3

    Default Re: MySQL command issues with an ADO Recordset

    Thanks Michael

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

    Rgds

    Laphan

    "Michael Austin" <com> wrote in message
    news:p163h.1558$news.prodigy.com...
    Laphan wrote:
     
    try:

    CONCAT(cast(PICFILEWIDTH as varchar),' x ',cast(PICFILEHEIGHT as varchar))

    Basically you are trying to use a function (CONCAT) that is
    character-datatype
    based with an integer datatype.


    --
    Michael Austin.
    :)


    Laphan Guest

Similar Threads

  1. MySQL-PHP-Flash: recordset
    By BernardoLira in forum Macromedia Flash Data Integration
    Replies: 2
    Last Post: December 5th, 08:26 PM
  2. Advanced recordset (PHP/MySQL)
    By davecheet in forum Dreamweaver AppDev
    Replies: 1
    Last Post: April 1st, 11:46 AM
  3. Passing Recordset data PHP and Mysql
    By davetheNewbie in forum Dreamweaver AppDev
    Replies: 0
    Last Post: February 28th, 01:17 PM
  4. Replies: 1
    Last Post: March 3rd, 02:15 PM
  5. Command Object and RecordSet ASP
    By Sean in forum ASP Database
    Replies: 4
    Last Post: February 26th, 12:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139