It’s really really easy. You just need a table with the appropriate driver
Here’s some source
PROGRAM
INCLUDE('EQUATES.CLW'),ONCE
MAP
CheckError(),LONG
END
ConnectString STRING(260)
count ULONG
people FILE,DRIVER('MSSQL'),NAME('people'),owner(ConnectString),PRE(P),CREATE,THREAD
PKkey KEY(P:code)
record RECORD
Code LONG
Name LONG
Age LONG
END
END
CODE
ConnectString = 'myServer,people,MyUser,MyPassword'
CREATE(people)
IF CheckError() THEN RETURN END
OPEN(people)
IF CheckError() THEN RETURN END
LOOP
NEXT(people)
IF ErrorCode() = 33 THEN BREAK END
DO Stuff
count += 1
END
CLOSE(people)
RETURN
Stuff ROUTINE
!Do Stuff here
CheckError FUNCTION
CODE
IF ERRORCODE()
IF ERRORCODE() = 90
MESSAGE('File System Error: (' & FILEERRORCODE() & ') ' & FILEERROR())
RETURN ERRORCODE()
END
MESSAGE('Error: ' & ERROR())
RETURN ERRORCODE()
END
RETURN 0
It’s really easy. in the dct just copy the file name to the full path name.
and
before you open the file in thiswindow.init put
glo:owner = ‘yourConnectString’
replace yourConnectString with the actual connect string. Only you can do that because it’s for your environment
@Michael_Evangelinos I"m not sure what time zone you are in, but I highly recommend you join in on the ClarionLive weekly Open Webinar. This is an open forum where you can ask any questions and get help actually making changes to your App. That would be so much more effective than the back and forth method here of asking folks to make changes to your app.
The webinar’s are Wed morning at 8 am Pacific, which is currently UTC-7. You can register here: https://www.clarionlive.com/
If everything is done as suggested and you are still getting problems look into the database administration security settings. There are several internal settings that can stop connection.