I wonder if someone is able to help me as I am having issues connected to my companies SQL database using Livecode.
Firstly, I have created an ODBC data source
I am using the following code in LIvecode:
Code: Select all
on mouseUp
-- use a global variable to hold the connection ID so other scripts can use it
global gConnectionID
-- connect to the database
put revOpenDatabase("ODBC", "data source name", "database name", "userid", "password" ) into tResult
-- check if it worked and display an error message if it didn't
-- & set the connection ID global
if tResult is a number then
put tResult into gConnectionID
answer info "Connected to the database." & cr & "Connection ID = " & gConnectionID
else
put empty into gConnectionID
answer error "Unable to connect to the database:" & cr & tResult
end if
end mouseUp
*unable to connect to the database: [microsoft] [odbc driver manager] data source name not found and no default driver specified*
Is someone able to help with this? Am very desperate!
Many thanks
Daniel