Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Oct 18, 2018 5:12 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: SQLExecute on ODBC
PostPosted: Sun Mar 10, 2013 10:22 pm 
Offline

Joined: Sat Mar 15, 2008 8:14 am
Posts: 161
Location: Montreal, Quebec, Canada
I everyone
I'v seen many post about ODBC connection
In my case...the connection is made and tested OK
But im unable to do transaction to the DB
My Datasource is "Dinox" and its connected
My Database create by MS server studio is "testDB"
iv declare testDB in a properties as ODBCDatabase
i want to add colum to it by:

oDB=New ODBCDatabase

oDB.DataSource ="dinox"
oDB.UserName = "Admin"
oDB.Password = "sqlz"
oDB.Timeout = 5


if oDB.Connect then
MsgBox "Connectez a "+oDB.DataSource

testDB.SQLExecute("create table Products (Name varchar)")

else
MsgBox "Failed to connect to " + EndOfLine + oDB.ErrorMessage
oDB = nil
end if

testDB.SQLExecute("create table Products (Name varchar)") return NilExecption
iv try to make hierarchy by dinox.testDB.SQLExecute("create table Products (Name varchar)")
doesn't work either..so i need help
thanks

_________________
--------------------
RB 2011r4 on win7


Top
 Profile  
Reply with quote  
 Post subject: Re: SQLExecute on ODBC
PostPosted: Mon Mar 11, 2013 6:02 am 
Offline

Joined: Mon Oct 13, 2008 4:26 am
Posts: 63
You are connecting to oDB but running your query against testDB. If you have declared both as ODBCDatabase then they are different entities. Try your query against oDB.


Top
 Profile  
Reply with quote  
 Post subject: Re: SQLExecute on ODBC
PostPosted: Mon Mar 11, 2013 8:36 am 
Offline

Joined: Sat Mar 15, 2008 8:14 am
Posts: 161
Location: Montreal, Quebec, Canada
Thank you
i didnt realize the double reference to different Database

_________________
--------------------
RB 2011r4 on win7


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group