Why won't this update statement work?

Kristafer Vale kristafer at comcast.net
Sat Mar 13 14:51:48 CST 2004


I don't have either of those two things available, but I have been able to
narrow it down to one interesting/annoying fact. If there is a call like
this:

  set query = "select ID, slideShowID, title, filename, artist, SlideOrder
from slides WHERE slideShowID like '\A"&gCurrentSlideShowID&"\Z' order by
SlideOrder"
  
set mySlidesCursor = new( xtra "VCursor", getRef(gMyLessonDB), query)

in the same handler as this:

SqlExecute( gMyLessonDB, "DELETE FROM slides")  

Then the SqlExecute command never fires. If I I move the sqlExecute it's own
handler separate from the vCursor handler then it works as expected. Why
would that be the case? Can we not mix a call to the database using  vCursor
in the same handler as a SqlExecute command?

The reason I want to do this is that I need to query the database for the
record information and then feed that info into my next command which will
update the previous information with some new data. I can't think of a
better way to do it then, use select in a cursor, then get info from the
cursor set to a variable, then use said variable to make new sqlExecute
command to update info. Am I missing something?

Thanks


Kristafer S. Vale
VK-iNTERACTiVE
6011 Medici CT #301
Sarasota, FL 34243
407-924-3025


-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] On Behalf Of Ruslan Zasukhin
Sent: Saturday, March 13, 2004 2:10 PM
To: valentina at lists.macserve.net
Subject: Re: Why won't this update statement work?

On 3/13/04 8:57 PM, "Kristafer Vale" <kristafer at comcast.net> wrote:

Hi Kristafer, 

> I'm attempting to test the UPDATE feature with this line of code in
Director
> MX 2004 on a PC running XP Pro.
> 
> myTEST = SqlExecute(gMyLessonDB, "UPDATE slides SET SlideOrder = '003' ")
> 
> It always returns zero no matter what, even though there are 3 records in
> the slides table.
> 
> Is there something wrong with the UPDATE feature? Have I misunderstood the
> documentation?
> 
> This is really frustrating, so any help is much appreciated.

1) please check Valentina error
    may be you have some typo?

2) try do this command in viSQL or Valentina Studio
    and see results

3) may be column SlideOrder is marked as unique?


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------

_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list