Welcome, Guest
Username: Password: Remember me
This public forum is meant for questions and discussions about Visual FoxPro
  • Page:
  • 1

TOPIC:

sqlexec 17 Jun 2020 00:25 #14990

  • jpmoschi
  • jpmoschi's Avatar
  • Topic Author


  • Posts: 76
  • 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?

    Please Log in or Create an account to join the conversation.

    sqlexec 17 Jun 2020 08:23 #14993

    • robert
    • robert's Avatar


  • Posts: 3595
  • 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
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    sqlexec 17 Jun 2020 18:46 #15019

    • jpmoschi
    • jpmoschi's Avatar
    • Topic Author


  • Posts: 76
  • my problem is: the CLR does'nt find the DLLs. In Console application i puted the dll in the folder bin\debug 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)

    Please Log in or Create an account to join the conversation.

    sqlexec 17 Jun 2020 19:09 #15022

    • robert
    • robert's Avatar


  • Posts: 3595
  • 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
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1