-
ADO Help
How can I do this in C++? I have searched for an example, but I can't find
anything. I do not want to use a database connection. If I can do this in
VB, why can I not do it in C++?
' Create three fields
rst.Fields.Append "Text1", adVarChar, 255
rst.Fields.Append "Text2", adVarChar, 255
rst.Fields.Append "Text3", adVarChar, 255
'Open the recordset
rst.Open
' Add a new record
rst.AddNew
' Add some bogus data
rst.Fields.Item("Text1").Value = "Text1 Record "
rst.Fields.Item("Text2").Value = "Text2 Record "
rst.Fields.Item("Text3").Value = "Text3 Record "
'Now update the data
rst.Update
Thanks,
Bill Gauvey
-
Re: ADO Help
I found it finally, a MS KB article - Saving an ADO Recordset to an IStream
[Q242249] - demonstrates how to create a recordset from scratch.
Bill Gauvey <bgauvey@I_HATE_SPAM_acxiom.com> wrote in message
news:3a2c07ac@news.devx.com...
> How can I do this in C++? I have searched for an example, but I can't find
> anything. I do not want to use a database connection. If I can do this in
> VB, why can I not do it in C++?
>
> ' Create three fields
> rst.Fields.Append "Text1", adVarChar, 255
> rst.Fields.Append "Text2", adVarChar, 255
> rst.Fields.Append "Text3", adVarChar, 255
>
> 'Open the recordset
> rst.Open
>
> ' Add a new record
> rst.AddNew
>
> ' Add some bogus data
> rst.Fields.Item("Text1").Value = "Text1 Record "
> rst.Fields.Item("Text2").Value = "Text2 Record "
> rst.Fields.Item("Text3").Value = "Text3 Record "
>
> 'Now update the data
> rst.Update
>
> Thanks,
>
> Bill Gauvey
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks