Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 11 Monaten, 1 Woche
Letzter Beitrag:
vor 11 Monaten, 1 Woche
Beteiligte Autoren:
DW, Fabrice Harari

WM 21 - Runing Stored Procedure form Ipad (Solved)

Startbeitrag von DW am 14.09.2016 17: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

Antworten:

Re: WM 21 - Runing Stored Procedure form Ipad

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

von Fabrice Harari - am 14.09.2016 19:02

Re: WM 21 - Runing Stored Procedure form Ipad

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

von DW - am 14.09.2016 23:10
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

von DW - am 14.09.2016 23:47
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.