Re: Transaction on VB
Posted in 1998
Topics: Installation, Setup & Upgrades, Connectivity: ODBC / JDBC / .NET
You need to first set up and ODBC connection to your Informix database. Here is a sample of what you need: Global genvrdo As rdoEnvironment Global gconrdo As rdoConnection Global grsfrdo As rdoResultset Global sql As String sql = "insert into table values ()" strconnect = "dsn=;database=;uid=;pwd=" 'this is where u reference ur odbc connection name Set envrdo = rdoEngine.rdoEnvironments(0) Set conrdo = envrdo.OpenConnection("", rdDriverNoPrompt, False, strconnect) Set rsfrdo = conrdo.OpenResultset(sql, rdOpenKeyset, rdConcurReadOnly, rdAsyncEnable + rdExecDirect) 'this executes the sql set form.rdocontrol.resultset = rsfrdo 'this puts results into your control This will connect you and execute your statement, hope it helps! -Heather CHOI Heung Ling wrote in message <6fr815$pgm@hpg30a.csc.cuhk.edu.hk>... >I have installed INFORMIX-CLI 2.50.TD2 for Microsoft Windows in my >Pentium NT40. I am using RDO of VB 5.0 to access Informix database >through ODBC. Can anyone tell or guide me how to perform a >transaction using RDO? Urgent! Thanks! > >P.S. I have used BeginTrans method of RDO connection but it gives me "Driver >not capable" error message when it is executed. Also, I have tried different >CursorDriver properties on making RDO connection but it still fails. >