Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to update data in CursorAdapter
Message
 
 
À
06/08/2007 04:28:53
Mk Sharma
Shrishti Solutions
Mumbai, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01245780
Message ID:
01246113
Vues:
29
>i am also trying to do this with SPT.
>
>
>myconn=sqlstringconnect("driver={Tally ODBC driver};server=local;port=9000")
>wait wind myconn  && showing 1
>if myconn<0
>   wait wind 'error ' nowa
>   retu
>else
>   wait wind 'Connected'  nowa
>endif
>
>myresult=sqlexec(myconn,'select ledger.$name, ledger.$parent from ledger',[mycursor])
>
>wait wind myresult  && Showing 1 and brow the data perfect as MEMO field.
>
>if myresult<0
>   wait wind 'Result Error'
>else
>   sele mycursor    && this is showing all the data
>   brow
>endif
>myresult=sqlexec(myconn,'insert into ledger (ledger.$name, ledger.$parent) values ([Apple],[Sundry Debtors]))
>
>wait wind myresult  && Showing 1 but not inserting the data into ledger table.
>
>if myresult<0
>   wait wind 'Result Error' nowa
>else
>   wait wind 'Record inserted ' nowa
>endif
>
>
>myresult=sqlexec(myconn,'select ledger.$name, ledger.$parent from ledger',[mycursor])
>
>wait wind myresult  && Showing 1 but not showing the records i inserted above.
>
>if myresult<0
>   wait wind 'Result Error'
>else
>   sele mycursor    && this is showing all the data
>   brow
>endif
>
>
>
>
>i think this ODBC connection accept data only in XML format.
>can you please show some code for send XML data to ODBC.
>
>this ODBC accept SOAP + XML, please where i can find more about SOAP + XML .
>
>you can see more detail at :
>
>http://www.rtslink.com/index.html
>
>warm ragards,
>mk.

I haven't done this, so I would need to research on this myself first.

Anyway, I noticed a slight problem here

myresult=sqlexec(myconn,'insert into ledger (ledger.$name, ledger.$parent) values ([Apple],[Sundry Debtors]))

I don't think you need to write it this way, it should be without ledger. in front of the fields. I also never named fields with $ in front.

What database are you using?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform