Newbie: Looking for Simplest Code to OpenConnection, OpenRecordset, Execute A SQL Statement Insert/Update 
Author Message
 Newbie: Looking for Simplest Code to OpenConnection, OpenRecordset, Execute A SQL Statement Insert/Update

Hi All,

Can anyone provide me with 3 simple functions for opening a connection
(connection object), opening a recordset, and executing an insert/update
statement (should be similar to number two)?

I am really looking for the most bare bones example as possible.

Thanks,
Devon



Sun, 02 Nov 2003 03:12:35 GMT  
 Newbie: Looking for Simplest Code to OpenConnection, OpenRecordset, Execute A SQL Statement Insert/Update
Hi,
    See 28 OLEDB examples at http://www.geocities.com/oledbpro


Quote:
> Hi All,

> Can anyone provide me with 3 simple functions for opening a connection
> (connection object), opening a recordset, and executing an insert/update
> statement (should be similar to number two)?

> I am really looking for the most bare bones example as possible.

> Thanks,
> Devon



Sun, 02 Nov 2003 05:20:59 GMT  
 Newbie: Looking for Simplest Code to OpenConnection, OpenRecordset, Execute A SQL Statement Insert/Update
I am actually looking to have source code not just use a component.  I would
like to have examples using ADO, not OLE Db.

Thanks,
Devon



Quote:
> Hi,
>     See 28 OLEDB examples at http://www.geocities.com/oledbpro



> > Hi All,

> > Can anyone provide me with 3 simple functions for opening a connection
> > (connection object), opening a recordset, and executing an insert/update
> > statement (should be similar to number two)?

> > I am really looking for the most bare bones example as possible.

> > Thanks,
> > Devon



Sun, 02 Nov 2003 13:29:16 GMT  
 Newbie: Looking for Simplest Code to OpenConnection, OpenRecordset, Execute A SQL Statement Insert/Update

hi,
for opening a connection & recordset,u can use CDatabase& Crecordset object.
CDatabase db;  
        db.Open(_T("empdsn1"),FALSE,FALSE,_T("ODBC;UID=prabha"),FALSE);
CRecordset rs1(&db);
rs1.Open(CRecordset::dynaset,_T("select count(*) from emp"));
        CString ins="insert into dep values("+a+",'"+b+"'"+")";
        db1.ExecuteSQL(ins);
try with this....
bye
pradha

Quote:
-----Original Message-----
Hi All,

Can anyone provide me with 3 simple functions for opening a connection
(connection object), opening a recordset, and executing an insert/update
statement (should be similar to number two)?

I am really looking for the most bare bones example as possible.

Thanks,
Devon

.



Sat, 08 Nov 2003 14:25:47 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Newbie: Looking for simplest code to call a sybase stored procedure from VC++

2. Problem executing simple code

3. Looking for simple source code

4. Simple Editor Code - looking for

5. Executing C# code (VB Execute & Eval)

6. Newbie looking for modem code!!

7. SQ: dereferenced pointer assign

8. rdo example with rdoenvironment:OpenConnection

9. Hanging Problem with _ConnectionPtr->OpenConnection

10. Looking for information on execute vs go

11. Looking for a way to find CPU time to execute

12. Looking for C (and/or C++) coding and code management standards

 

 
Powered by phpBB® Forum Software