Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Leonard Trevor
  Where is Leonard Trevor?
 Edinburgh
 United Kingdom
 Leonard Trevor
 To: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 Tags
Subject: RE: Combo boxes behaving weirdly in sql using SPT
Thread ID: 104473 Message ID: 104552 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Errors & Debugging
Date: Thursday, August 17, 2006 2:53:29 PM         
   


Point of Information

How do you insert into 2 datafiles at the same time using ths
insert
command in spt on a form


I'm using vfp6 do you have the syntax

TEXT TO _____ NOSHOW TEXTMERGE
.......
.......

ENDTEXT








> Instead of having so many variables and concatenating the string do something like:
>
> STORE SQLCONNECT('admin', 'sa', '') TO nHandle
> TEXT TO strSQL NOSHOW TEXTMERGE
>      UPDATE paymast SET  Fname      = '<<alltrim(ThisForm.pageframe1.page1.fname1.Value)>>',
>                          mid_name   = '<<alltrim(ThisForm.pageframe1.page1.midname1.Value)>>',
>                          maiden_nam = '<<alltrim(ThisForm.pageframe1.page1.maiden_name1.Value)>>',
>                          lname      = '<<alltrim(ThisForm.pageframe1.page1.lname1.Value)>>',
>                          title1     = '<<alltrim(ThisForm.pageframe1.page1.title1.Value)>>',
>                          dept       = '<<alltrim(ThisForm.pageframe1.page1.dept1.Value)>>',
>                          deptname   = '<<alltrim(ThisForm.pageframe1.page1.deptname1.Value)>>',
>                          position1  = '<<alltrim(ThisForm.pageframe1.page1.position1.Value)>>',
>                          posname    = '<<alltrim(ThisForm.pageframe1.page1.posname1.Value)>>',
> ....... PUT the rest of fields here.
> 
>      WHERE idno = '<<alltrim(ThisForm.pageframe1.page1.IDNO1.Value)>>'
> ENDTEXT
> nResult=SQLEXEC(nHandle, strSQL)
> IF nResult > 0
>     MESSAGEBOX('Record Updated.', 64, 'Update')
> ELSE
> *** ALWAYS CHECK Wahat is the error
>     AERROR(laError)
>     MESSAGEBOX('Error Occured! The error is'+laError[1,2], 64, 'Update')
> ENDIF
> 

>
> BTW I can't see where you use Combo values which causes error?


ENTIRE THREAD

Combo boxes behaving weirdly in sql using SPT Posted by Leonard Trevor @ 8/16/2006 9:36:42 PM
RE: Combo boxes behaving weirdly in sql using SPT Posted by Borislav Borissov @ 8/16/2006 9:52:55 PM
RE: Combo boxes behaving weirdly in sql using SPT Posted by Leonard Trevor @ 8/16/2006 11:27:36 PM
RE: Combo boxes behaving weirdly in sql using SPT Posted by Borislav Borissov @ 8/17/2006 9:19:07 AM
RE: Combo boxes behaving weirdly in sql using SPT Posted by Leonard Trevor @ 8/17/2006 11:07:00 AM
RE: Combo boxes behaving weirdly in sql using SPT Posted by Borislav Borissov @ 8/17/2006 11:10:36 AM
RE: Combo boxes behaving weirdly in sql using SPT Posted by Leonard Trevor @ 8/17/2006 1:17:47 PM
RE: Combo boxes behaving weirdly in sql using SPT Posted by Borislav Borissov @ 8/17/2006 1:20:09 PM
RE: Combo boxes behaving weirdly in sql using SPT Posted by Leonard Trevor @ 8/17/2006 2:01:24 PM
RE: Combo boxes behaving weirdly in sql using SPT Posted by Borislav Borissov @ 8/17/2006 2:18:04 PM
RE: Combo boxes behaving weirdly in sql using SPT Posted by Leonard Trevor @ 8/17/2006 2:53:29 PM
RE: Combo boxes behaving weirdly in sql using SPT Posted by Borislav Borissov @ 8/17/2006 3:04:47 PM
RE: Combo boxes behaving weirdly in sql using SPT Posted by Leonard Trevor @ 8/17/2006 4:55:14 PM
RE: Combo boxes behaving weirdly in sql using SPT Posted by Ken Murphy @ 8/17/2006 3:48:53 PM