|
| WM 21 - Runing Stored Procedure form Ipad |
| Iniciado por guest, 14,sep. 2016 19:55 - 3 respuestas |
| |
| | | |
|
| |
| Publicado el 14,septiembre 2016 - 19:55 |
Hello All
I have a stored procedure that I have used for years know I am trying to write a iPad app and when the call to the procedure it gives me an error.
vStoredResult is Variant = HExecuteProcedure(gsConnectionName,sp_Doc_Get,sFullPath,gsSessionID)
This is the procedure : It loads a document on the server into a data file.
sp_Doc_Get(sFullPath is string,sSessionID is string) sResult is string = "" IF sSessionID > 0 THEN IF HReadSeekFirst(DOCTRANSPORT,SessionID,sSessionID) THEN sResult = sResult+ "" IF fFileExist(sFullPath) THEN IF HLinkMemo(DOCTRANSPORT,Document,sFullPath,hMemoBin) THEN sResult = sResult+ "" ELSE sResult = sResult+ "" END IF HModify(DOCTRANSPORT) THEN sResult = "OK" ELSE // HModify sResult = sResult+"" END ELSE sResult = sResult+ "" END ELSE //HreadseekFirst sResult = "" END ELSE // Machine ID sResult = "" END RESULT = sResult On the iPad when the procedur runs I get a error 75003 WLanguage error running the stored procedure
Any Ideas.
Dennis |
| |
| |
| | | |
|
| | |
| |
| Publicado el 14,septiembre 2016 - 21:02 |
Hi Dennis,
2 potential problems.
1. Your strings are not typed... So all your "is string" suddenly means is UNICODE string in your ios app, but NOT on the server. Therefore, your procedure parameters may be mismatched (sent as unicode, wanted as ansi)
2. WHERE is your document? If you are calling this from an IOS app, I would think that your sFullPath contains a local iphone path... If that's the case, there is no chance that your code can work, as the server has no access to the iphone
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,septiembre 2016 - 01:10 |
Hello Fabrice,
I think it is a Unicode issue
if I hard code the file path
vStoredResult is Variant = HExecuteProcedure("CabinetTracServer",sp_Doc_Get,"E:\CT DOCS 2015\JN27895\AVENEWDOORS27895.pdf",1)
it works.
Where do I do the conversion of ANSI to Unicode or vice versa. I would like not to change the stored procedure if it is possible. I would rather force it to be sent as a ANSI string from the iPad?
Dennis |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,septiembre 2016 - 01:47 |
Thanks Fabrice,
I got it!!!
by putting a set of brackets around the variables then it send it by value rather then address.
Before : HExecuteProcedure(gsConnectionName,sp_Doc_Get,sFullPath,gsSessionID)
After : HExecuteProcedure(gsConnectionName,sp_Doc_Get,(sFullPath),(gsSessionID))
Dennis W |
| |
| |
| | | |
|
| | | | |
| | |
|