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--