Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange SPT Behavior
Message
 
 
To
26/05/2004 09:28:31
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00907317
Message ID:
00907368
Views:
13
What's the reason you're using SQLPREAPRE in this case? It should work the same w/o it.

>The following code will work just fine:
>
>Procedure view_only_drawing_inquiry
>
>= SQLSETPROP(pdm_var.as400_connection, 'asynchronous', .F.)
>= SQLPREPARE(pdm_var.as400_connection, "Select * From webprddt6.drawmstrp Where webprddt6.drawmstrp.dm_drawing_number = '" + AllT(pdm_var.current_drawing_no) + "'", 'as400_query')
>= SQLEXEC(pdm_var.as400_connection)
>
>EndProc
>
>with the following exception:
>
>on some of our newest winXP machines(not all winXP machines) I will get an error that SQL statement parameter is required for non-prepared SQLEXEC() calls. This will only occurr(1 time) if the above code is ran just after the following code is ran:
>
>Procedure edit_drawing_inquiry
>Local f1,f2
>Local as400_edit_string
>as400_edit_string = ""
>
>f1 = "dm_drawing_number"
>f2 = "dm_drawing_title"
>Set Escape Off
>
>as400_edit_string = "Select * From webprddt6.drawmstrp Where dm_drawing_number = '" + AllT(pdm_var.current_drawing_no) + "'"
>
>=SQLEXEC(pdm_var.as400_connection, as400_edit_string, 'as400_query')
>=CURSORSETPROP("Tables" , "webprddt6.drawmstrp")
>=CURSORSETPROP("UpdateNameList" , "dm_drawing_number webprddt6.drawmstrp.dm_drawing_number, dm_drawing_title webprddt6.drawmstrp.dm_drawing_title")
>=CURSORSETPROP("KeyFieldList", "dm_drawing_number")
>=CURSORSETPROP("UpdatableFieldList", f1 + "," + f2)
>=CURSORSETPROP("SendUpdates", .T.)
>Set Escape On
>
>EndProc
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform