Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to connect to database in micros isl on wks4 or 5 1

Status
Not open for further replies.

jd11111

Programmer
Apr 29, 2010
160
US
I am trying to write a script that will query and at times update a custom table in the micros database. It works fine when running ops on the micros server or on a win32 client. However, when running on micros Windows CE client (workstation 4 or 5), we get an error "integer overflow" and then "undefined function" when it gets to the DLLLoad command. Is it possible to use MDSSysUtilsProxy.dll to connect to the database using a windows CE client?

below is an example of where the error happens:

if hODBCDLL = 0
DLLLoad hODBCDLL, “MDSSysUtilsProxy.dll"
endif
if hODBCDLL = 0
exitwitherror “Unable to Load MDSSysUtilsProxy.dll”
endif

Does anyone have an example script that works?
 
//-------------------------------------------------------------------------------------//

sub load_sql

if h_sql = 0
DLLLoad h_sql, "MDSSysUtilsProxy.dll"
endif

if h_sql = 0
exitwitherror "Unable to Load MDSSysUtilsProxy.dll"
endif

endsub

//-------------------------------------------------------------------------------------//

sub connect_sql

var constatus : N9
// Connect to micros 3700 database
DLLCALL_CDECL h_sql, sqlIsConnectionOpen(ref constatus)

if constatus = 0
DLLCALL_CDECL h_sql, sqlInitConnection("micros","ODBC;UID=custom;PWD=custom", "")
endif

endsub

//-------------------------------------------------------------------------------------//
 
this is actually what I already have, except the variable h_sql was hODBCDLL. Are you sure this works on windows CE clients?

How do you declare the h_sql variable?

I used hODBCDLL : n9


thanks for your help!
 
This does work on a CE client. What version of MICROS are you using? Are you sure it is not anything else after you load the DLL? Mind sharing your script and I can test it on my lab?
 
thanks for the follow up...I'm running res 4.7

I changed the length of the integer variable from n9 to n20 and it works on a workstation now.

Is it possible to use this dll to connect to a remote database (if it exists in ODBC connections on the server)?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top