xsharp.eu • sqlexec
Page 1 of 1

sqlexec

Posted: Tue Jun 16, 2020 10:25 pm
by jpmoschi
hi Forum
I have a problen with sqlexec function
LRESULT = SqlExec(_HANDLE, "Select getdate() dummy ","dummyselect",miarray )
Lresult is -1 but i am shure, some sql command are correctly executed because I checked it in my MS SQL Profiler.but
In VFP, when sqlexec returns lest than 0 the aerror() function returns an array with the error description.
how can i check what is hapened ? ¿any Ideas?

sqlexec

Posted: Wed Jun 17, 2020 6:23 am
by robert
Juan,
This should work. I am not sure why it fails.
And yes, we do not have the AError() function yet,
But you can retrieve the last error (an object of type Exception) by accessing XSharp.RuntimeState.LastRddError

Robert

sqlexec

Posted: Wed Jun 17, 2020 4:46 pm
by jpmoschi
my problem is: the CLR does'nt find the DLLs. In Console application i puted the dll in the folder bindebug and it functioned ok.
But in the template project Windows Form VFP the same solution do not correct the problem.
I not prefer to use GAC never. How could i resolve all dll locations in debug mode ?
My IDE is VS Professional 2015)

sqlexec

Posted: Wed Jun 17, 2020 5:09 pm
by robert
Juan,
We really recommend using the GAC on your development machine.
It is easy and it works.

If you don't want to use the GAC then we recommend you add references in your project to all DLLs that you need, including XSharp.RDD, XSharp.Macrocompiler and set the property in VS to copy the DLLs to the output folder.

You can also copy the Redist subfolder from the X# directory to your output directory. If you do not use the VO compatible SDK classes you can omit the files that start with "VO"

Robert