User Tag List

Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 32

Thread: Question for ODBC experts

  1. #21
    No Products Registered

    Join Date
    Jul 2006
    Location
    Oregon, USA
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question for ODBC experts

    Nice tutorial...but it does not have an answer to my question. It only talks about passing fixed values to DB (I don't have a problem doing that). I had a problem passing a STRING from the Edit Object (solved by using a combination single/double quotes and a "+" sign). And now there is a new problem - passing NUMERICAL values from the Edit Object. No matter what quotes I am using (or no quotes) - I either get SYNTAX ERROR or nothing goes to DB. So, the question is: WHAT IS THE RIGHT SYNTAX I CAN USE TO PASS NUMERICAL VALUE FROM THE EDIT OBJECT TO MS ACCESS DB? See the command: "INSERT INTO TABLE_NAME (PHONE_NUMBER) VALUES (????EDIT VALUE ("PHONE")????)"

  2. #22
    No Products Registered

    Join Date
    Jul 2006
    Location
    Oregon, USA
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question for ODBC experts

    Nice tutorial...but it does not have an answer to my question. It only talks about passing fixed values to DB (I don't have a problem doing that). I had a problem passing a STRING from the Edit Object (solved by using a combination single/double quotes and a "+" sign). And now there is a new problem - passing NUMERICAL values from the Edit Object. No matter what quotes I am using (or no quotes) - I either get SYNTAX ERROR or nothing goes to DB. So, the question is: WHAT IS THE RIGHT SYNTAX I CAN USE TO PASS NUMERICAL VALUE FROM THE EDIT OBJECT TO MS ACCESS DB? See the command: "INSERT INTO TABLE_NAME (PHONE_NUMBER) VALUES (????EDIT VALUE ("PHONE")????)"

  3. #23
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperiOS Export ModuleMac Export ModuleSWF Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    JasonDarby's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    4,938
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Question for ODBC experts

    Can you upload an example? That might be easier.

  4. #24
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperiOS Export ModuleMac Export ModuleSWF Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    JasonDarby's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    4,938
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Question for ODBC experts

    Can you upload an example? That might be easier.

  5. #25
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleSWF Export Module
    AndyH's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,445
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Question for ODBC experts

    Most SQL queries will allow you to wrap your data in 'single quotes' like the other example. Have you tried that? Been a while since I used Access.

    BTW, a telephone number is usually best stored as text, so you don't loose the starting 0 (a telephone number is not really a number in the sense of 2+3, it's an ID that just happens to be numbers <img src="/center/images/graemlins/wink.gif" alt="" />) but you should also check that the size of your number data type in your database can hold a numeric value as long as a telephone number... maybe it is rejecting it on that?
    Andy H @ ovine.net
    Awful Jokes - a new cartoon every day: http://awful.ovine.net/
    Ovine's games: http://www.ovine.net

  6. #26
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleSWF Export Module
    AndyH's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,445
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Question for ODBC experts

    Most SQL queries will allow you to wrap your data in 'single quotes' like the other example. Have you tried that? Been a while since I used Access.

    BTW, a telephone number is usually best stored as text, so you don't loose the starting 0 (a telephone number is not really a number in the sense of 2+3, it's an ID that just happens to be numbers <img src="/center/images/graemlins/wink.gif" alt="" />) but you should also check that the size of your number data type in your database can hold a numeric value as long as a telephone number... maybe it is rejecting it on that?
    Andy H @ ovine.net
    Awful Jokes - a new cartoon every day: http://awful.ovine.net/
    Ovine's games: http://www.ovine.net

  7. #27
    No Products Registered

    Join Date
    Jul 2006
    Location
    Oregon, USA
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question for ODBC experts

    example is simple:
    - make one frame app
    - place Edit object in the frame and call it PHONE
    - place ODBC object in the frame and set it up for your DB
    - create table CUSTOMERS in the DB and make a column PHONE (set it up to be numbers)
    - place push button SEND in the frame
    in the Event Editor do this: Button SEND clicked? - New Statement + Send SQL Command "INSERT INTO CUSTOMERS (PHONE) VALUES (Edit Value( "Phone" ))" + Get Row. RESULT - Syntax Error in MMF. Remove double quotes around Phone - MMF accepts it but sends nothing to DB. I mean I am trying to send numbers from the Edit Object...should I just send them as a STRING? I am not sure if that makes any difference with DB to have them as text versus numbers.

  8. #28
    No Products Registered

    Join Date
    Jul 2006
    Location
    Oregon, USA
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question for ODBC experts

    example is simple:
    - make one frame app
    - place Edit object in the frame and call it PHONE
    - place ODBC object in the frame and set it up for your DB
    - create table CUSTOMERS in the DB and make a column PHONE (set it up to be numbers)
    - place push button SEND in the frame
    in the Event Editor do this: Button SEND clicked? - New Statement + Send SQL Command "INSERT INTO CUSTOMERS (PHONE) VALUES (Edit Value( "Phone" ))" + Get Row. RESULT - Syntax Error in MMF. Remove double quotes around Phone - MMF accepts it but sends nothing to DB. I mean I am trying to send numbers from the Edit Object...should I just send them as a STRING? I am not sure if that makes any difference with DB to have them as text versus numbers.

  9. #29
    No Products Registered

    Join Date
    Jul 2006
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question for ODBC experts

    dude, you can't mix strings and numbers in an expression.
    "a" + 3
    doesn't make sense to MMF. Just get the string from the edit box instead of a number. It should work fine.

    If, for some reason, you ever have to convert a number to a string you must cast it with str$()

  10. #30
    No Products Registered

    Join Date
    Jul 2006
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question for ODBC experts

    dude, you can't mix strings and numbers in an expression.
    "a" + 3
    doesn't make sense to MMF. Just get the string from the edit box instead of a number. It should work fine.

    If, for some reason, you ever have to convert a number to a string you must cast it with str$()

Page 3 of 4 FirstFirst 1 2 3 4 LastLast

Similar Threads

  1. ODBC database
    By DANY in forum File Archive
    Replies: 1
    Last Post: 13th February 2011, 02:04 AM
  2. Experts please help
    By DAH in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 16th September 2009, 11:10 AM
  3. Question for Sin, Cos, Tan Experts. (pictures)
    By Bruto in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 13th March 2008, 03:01 AM
  4. odbc
    By bensmid66 in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 26th October 2007, 08:37 PM

Posting Permissions

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