Professional Web Applications Themes

ado xtra - integer variable in sql-string - Macromedia Director Lingo

How can I insert an integer variable in an sql-string? I know how to do it with string-variables ('"&text&"") which works fine, but I don't get it working with integer variables. I tried '+number+' and all kinds of variations, but nothing works. I keep getting the error that tells me that there the types are not the same. COM error: Code = 80040e07 Code meaning = IDispatch error #3079 does anybody know what I have to do? Jan...

  1. #1

    Default ado xtra - integer variable in sql-string

    How can I insert an integer variable in an sql-string? I know how to do it with string-variables ('"&text&"") which works fine, but I don't get it working with integer variables. I tried '+number+' and all kinds of variations, but nothing works. I keep getting the error that tells me that there the types are not the same.

    COM error:
    Code = 80040e07
    Code meaning = IDispatch error #3079

    does anybody know what I have to do?

    Jan


    janosch webforumsuser@macromedia.com Guest

  2. #2

    Default Re: ado xtra - integer variable in sql-string

    What is the problem?

    Usually you can do it either with:
    rst["SomeField"] = intValue

    or cnn.Execute("UPDATE SomeTable SET SomeField = " & intValue)

    --
    Best regards,
    Eugene Shoustrov
    [url]www.xtramania.com[/url]
    ADOxtra - ADO databasing over LAN, over Internet for Director and MUS.
    VbScriptXtra - Full control over MS Word, Excel, IE etc., ADO, ADOX, ADOMD,
    DAO right from Lingo.

    "janosch" <webforumsusermacromedia.com> wrote in message
    news:bmg38k$fde$1forums.macromedia.com...
    How can I insert an integer variable in an sql-string? I know how to do it
    with string-variables ('"&text&"") which works fine, but I don't get it
    working with integer variables. I tried '+number+' and all kinds of
    variations, but nothing works. I keep getting the error that tells me that
    there the types are not the same.

    COM error:
    Code = 80040e07
    Code meaning = IDispatch error #3079

    does anybody know what I have to do?

    Jan



    Eugene Shoustrov Guest

  3. #3

    Default Re: ado xtra - integer variable in sql-string

    I found the answer myself, to my question whisch was probably not very clear. My question was about the use of variables in the WHERE clause of an SQL statement.

    I found that I can use string variables like this:

    sql="select * from table where field=' "&stringvariable&" ' "

    and after a long search on the WWW I found that the following is the syntax in case of an integer variable:

    sql="select * from table where field="&Integervariable&" "




    janosch webforumsuser@macromedia.com Guest

Similar Threads

  1. string to integer
    By Mark Fenbers in forum Macromedia Flash Data Integration
    Replies: 10
    Last Post: May 23rd, 08:08 AM
  2. check string rep's integer
    By sinister in forum PHP Development
    Replies: 7
    Last Post: November 24th, 09:27 AM
  3. php array problem string to integer
    By Sébastien in forum PHP Development
    Replies: 0
    Last Post: August 3rd, 06:17 AM
  4. HowTo check if my String is a Number (Integer) ?
    By Craig Deelsnyder in forum ASP.NET
    Replies: 0
    Last Post: July 27th, 11:06 PM
  5. Equating a String & Integer Variable
    By Roger Lord in forum ASP.NET General
    Replies: 2
    Last Post: July 3rd, 02:21 AM

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