Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need info about CursorAdapter
Message
 
 
À
03/03/2003 23:10:33
Peter Wagner
Point Informática Ltda.
Limeira, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00760726
Message ID:
00760727
Vues:
10
Peter,

Check UT download section:
- CursorAdapter Sample Code File #17265
- CursorAdapter VCX Builder File #17264

>I'm trying to understand and find benefits in using CursorAdapter.
>I've read the help and couldn’t find samples of code that would explain-me my doubts.
>
>In the server side I have SP to Insert/Delete/Update.
>Those SP always have this structure.. SSP_Action_TableName, where Action can be INS/DEL/UPD.
>
>I would like to call the SP and send the parameters from the cursor to the SP in SQL Server.
>Should I use SQLEXEC ?
>The question is because when I use SPT I first build the statement that I send to SQL Server...
>
>cSQL = " (ALLTRIM(cursor_name.field1.VALUE))" + "," + ;
> "(ALLTRIM(cursor_name.field2.VALUE))".....
>SQLString = "EXECUTE" + Stored_Procedure_Name + cSQL
>
>IF SQLExec(nHandle, cSQLString) < 1
>* Error !!
>ENDIF
>
>Do I use SQLEXEC to call a SP and pass the parameters in CA?
>If not?, how can I call a SP and pass those parameters...(If possible some sample)
>
>----
>I'm trying to go one step ahead to increase the speed when developing with CA.
>In my case, because I call SP I have to build my own commands for the Update/Delete/Insert operations.
>first I want to get the name of the SP relative to the table.
>
>Because all my SP at the server have the name of the table, I thing I could get the name of those SP doing something as:
>Select name from sysobjects where xtype = 'P' and patindex('%Table_Name%',name) <> 0
>Then select the SP from the list and then add all the fields’ values necessary from the cursor to the SP.
>Is this a good approach? any better ideia ?
>
>----
>The more o try to understand CA, I only see 2 benefits in using it:
>1) No need of Database at station
>2) Create a Base Class of CA and all subclasses would use the same Connection Handle.
>
>I can't see anything else; I also at this moment see more work in building my CA.
>What I'm missing??
>
>----
>Where Can I find some good samples about CA?
>
>IMO this is a new topic in VFP, so I expected a better sample and a better help from MS,
>I fill that MS expect that we should know everything from the beginning, for waht a help for
>a new topic.
>
>Any help would be appreciated.
>
>Thanks in Advance
>
>Peter
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform