Normal Topic Update my Customers Form using @XResultSet.. (Read 731 times)
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Update my Customers Form using @XResultSet..
Jun 19th, 2008 at 5:39pm
Print Post Print Post  
Hello!
I would like to use the @XResultSet - family to tupdate in the address-file the telephone, the Address.., to supplement or corrects a field Without to leave the  current form?
does this go?

Thanks for the help and suggestions.


Dr. Belhareth
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Update my Customers Form using @XResultSet..
Reply #1 - Jun 23rd, 2008 at 7:52pm
Print Post Print Post  
Yes you can use the XResultSet family of commands to update a record in another database without leaving the current form.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: Update my Customers Form using @XResultSet..
Reply #2 - Jun 23rd, 2008 at 8:43pm
Print Post Print Post  
Hello Ray !

I want try it with this Code in Main Form:

var vRS as Int
var vName as String
var vList as String

     vList = @XLookupAll(@FN, "/=", "Main Form!Kunde", "Kunde")
     If vList <> ""
     {
           vList = @SortStringArray(vList, 0)
           vName = @PopupChoiceList(vList, "SELECT A RECORD ")

           If vName <> ""
           {
                 vRS = @XResultSetSearch(@FN, "Customers", SEARCH_MODE_AND,SEARCH_SYNTAX_QA, "Kunde=" + vName)
                 If vRS > -1
                 {
                 vAdresse = @XResultSetValue(vRS, "Adresse")
                 vOrt    = @XResultSetValue(vRS, "Ort")

                       If @XResultSetLocked(vRS) = 0  and ( vAdresse <> Adresse or vOrt <> Ort)
                       {

                       XResultSetValue(vRS, "Adresse", Adresse)
                             XResultSetValue(vRS, "Ort",  Ort)
                              XResultSetClose(vRS)      
                                                   
                       }
                 {
                 @MsgBox("Error: Kunde wurde nicht gefunden.", "", "")
                 }
           
     }
     Else
     {
           @MsgBox("Error:  die Kunden - Liste ist fehlgechalgen", "", "")
     }
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged