• Welcome, Guest. Please login.
 
September 17, 2019, 10:53:31 am

News:

Welcome to the SQLitening support forums!


slExebind error problem

Started by httemp, August 04, 2013, 03:59:37 am

Previous topic - Next topic

httemp

Hi, I am new user for Sqlitening
I meet err when I use example. What's the reason?

OS:Win 7
Example B, meet error.
-19 Invalid string or request
Statement = ExeBind Insert into One.T1 values(?,?,?,"Just some data")

Trace to here:
   slExeBind slBuildInsertOrUpdate("One.T1", "?" & $NUL & "?" & $NUL & "?" & $NUL & "Just some data"), _
                                    slBuildBindDat("Encrypt and Compress as Text", "TNC") & _
                                    slBuildBindDat("Encrypt and Compress as Blob", "BNC") & _
                                    slBuildBindDat("Neither as Text", "T")   


cj

Something may have changed in the source file?

slSetProcessMods "K1234567890123456" 'encryption key
slExeBind slBuildInsertOrUpdate("One.T1", "?" & $NUL & "?" & $NUL & "?" & $NUL & "Just some data"), _
                                    slBuildBindDat("Encrypt and Compress as Text", "TNC") & _
                                    slBuildBindDat("Encrypt and Compress as Blob", "BNC") & _
                                    slBuildBindDat("Neither as Text", "T")

httemp

There is no change in the source file of the example A to D.
Because I want to use SqliteningServer on the computer without Administrator permission. So I changed the Sqliteningserver   from service to  normal win app. Remove the part of  the windows service function.  The example A&D is running well.

The example A and C meet problem in "slExebind ", Same err code:  -19 Invalid string or request

One guess: Character code problem ?  The result of  " slBuildBindDat("Encrypt and Compress as Text", "TNC")" is unreadable codes with Chinese character.  I am in China. My OS is English version. The setup of Language for non-unicode programs is Chinese. But  I have no admin right to change it in this computer.

cj

August 05, 2013, 08:34:12 am #3 Last Edit: August 05, 2013, 11:54:31 am by cj
http://www.sqlitening.com/support/index.php?topic=3517.msg18101#msg18101

Quote
Feedback:
I have recompiled using PB905 and the problem went away. I have reported the error to PB. The problem only happens if the Input locale is changed to Chinese (Traditional, Hong Kong S.A.R) so if any of you have funnies, consider recompiling the DLL in PB9


%SQLitening_InvalidStringOrRequest  = -19 - Invalid string or request

cj

August 05, 2013, 09:55:13 am #4 Last Edit: August 05, 2013, 11:51:03 am by cj

FUNCTION PBMAIN()
  slOpen "ExampleB_New1.Sld", "C"
  slExe "Create Table If Not Exists T1 (F1, F2, F3, F4)"
  slSetProcessMods "K1234567890123456"
  slExeBind slBuildInsertOrUpdate("T1","?"&$NUL & "?"& $NUL&"?"&$NUL&"A"), _
     slBuildBindDat("A", "TNC") & _
     slBuildBindDat("A", "BNC") & _
     slBuildBindDat("A", "T")
  slSel "Select * from T1"
  slGetRow
  ? slFX(1,"DU") + slFx(2,"DU") + slF(3) + slf(4) 'returns AAAA
END FUNCTION

cj

August 05, 2013, 11:49:35 am #5 Last Edit: August 05, 2013, 12:04:43 pm by cj

#INCLUDE "\sql\inc\sqlitening.inc"
FUNCTION PBMAIN()
  LOCAL x AS LONG, s, s1 AS STRING
  slSetProcessMods "K1234567890123456"
  s = slBuildBindDat("A", "T")
  FOR x = 1 TO LEN(s)'
    s1 = s1 + FORMAT$(ASC(s,x)) + ","
  NEXT
  ? s1,,"PBWIN10" 'returns 2,0,0,0,84,65
  RESET s1
  s = slBuildBindDat("A", "TN")
  FOR x = 1 TO LEN(s)'
    s1 = s1 + FORMAT$(ASC(s,x)) + ","
  NEXT
  ? s1,,"PBWIN10"
  '17,0,0,0,84,88,180,217,168,248,31,53,88,52,144,171,184,150,108,21,185
END FUNCTION

                         



httemp

Thank you..  I think I know the problem

My PB version is 9.01