Try with this command:

ConnNum= Server_Connect("QELIB","SRVR=" + gcSRV + ";DBMS=" + gcDSN +
";DNS="+";DB=" + gcDTB + ";UID="+gcUSR+";PWD="+gcPSW)


Where

gcSRV = Is the name of PC server where life database
gcDSN = Is the name of DSN
gcDTB = Name of DataBase
gcUSR = User of Database
gcPSW = Password to login



Jorge Cordero
Mexico DF



-----Mensaje original-----
De: Sloan Ritchie [mailto:[EMAIL PROTECTED] 
Enviado el: Monday, March 22, 2004 4:04 PM
Para: [EMAIL PROTECTED]
Asunto: MI-L ODBC Dialog

Hi,

Bear with me, I am not an experienced programmer.  How do I use the
following MapBasic code, but also have the ODBC dialog click "OK"
automatically. I want this to run every day automatically.

  Can I add a line of code that will allow the  ODBC dialog "OK" button
to
occur automatically?


  Thanks,
  Sloan


          ConnNum =
Server_Connect("ODBC","DSN=ARS1;UID=user;PWD=password")
          hstmt = Server_Execute (ConnNum, "Select Request_ID,
Device_Name,
Latitude, Longitude, Access_Type, Date_Time_Targeted_Real, Assigned_To,
Date_Time_Assigned, Site_Owner, Product_Type, Short_Description,
Freeform_Description, Notes, Num_Preferrred_TOMMS, Status, SC_Affected
from
Service_Request where SC_Affected like '%Puget%' and Status <>'Closed'")
          Server hstmt Fetch Into "ARS_tickets"
          Commit Table ARS_tickets As "ticket"
          Close all interactive
          Server hstmt Close
          Server ConnNum Disconnect


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 11009

Reply via email to