473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

C# and ADO (Not ADO.NET) recordset

All,

I am using C# and would like to create a ADO (NOT ADO.NET) disconnected
recordset. Is this possible and how would I go about it.

Thanks
Msuk
Nov 16 '05 #1
4 4063
sounds like you need to read about DataSets and ADO.NET

use a DataAdapter to Fill() a DataSet, and go from there...

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.com...
All,

I am using C# and would like to create a ADO (NOT ADO.NET) disconnected
recordset. Is this possible and how would I go about it.

Thanks
Msuk

Nov 16 '05 #2
Hi,

If I was to go with a ADO.NET Dataset could I send it back to a COM VB6
component which would treat it like a ADO 2.8 Recordset object?

Thanks
Msuk

"Sam Martin" wrote:
sounds like you need to read about DataSets and ADO.NET

use a DataAdapter to Fill() a DataSet, and go from there...

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.com...
All,

I am using C# and would like to create a ADO (NOT ADO.NET) disconnected
recordset. Is this possible and how would I go about it.

Thanks
Msuk


Nov 16 '05 #3
Hi,

try this KB article.
http://support.microsoft.com/default...b;en-us;308611
change the cursor location of the recordset to adUseClient to make it
disconnected one.

regards
Joyjit
"msuk" <ms**@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.com...
All,

I am using C# and would like to create a ADO (NOT ADO.NET) disconnected
recordset. Is this possible and how would I go about it.

Thanks
Msuk

Nov 16 '05 #4
Hi,

This is fine, but if I want to append more fields onto the end of the
records c# keeps throwing an exception as it is not happy about optional
parameters. Even if I enter the correct types for the parameters it still
throws an exception stating one of the type or data is incorrect but the code
work fine in VB6

See if below:

using System;
using ADODB;

namespace ConsoleApplication1
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
ADODB.Recordset objRecordSet= new ADODB.Recordset();
objRecordSet.ActiveConnection = null;
objRecordSet.CursorLocation = ADODB.CursorLocationEnum.adUseClient;
objRecordSet.LockType = ADODB.LockTypeEnum.adLockBatchOptimistic;

objRecordSet.Fields.Append
("field1",ADODB.DataTypeEnum.adChar,10,ADODB.Field AttributeEnum.adFldMayBeNull ,"test");
//objRecordSet.Open();

}
}
}

"Joyjit Mukherjee" wrote:
Hi,

try this KB article.
http://support.microsoft.com/default...b;en-us;308611
change the cursor location of the recordset to adUseClient to make it
disconnected one.

regards
Joyjit
"msuk" <ms**@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.com...
All,

I am using C# and would like to create a ADO (NOT ADO.NET) disconnected
recordset. Is this possible and how would I go about it.

Thanks
Msuk


Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: James Baker | last post by:
I'm getting an error: "Operation is not allowed when the object is closed." on the lines of code below. I can't imagine why the object would be closed where it says it will be, I've just opened it...
0
by: Dot Netizen | last post by:
I am having trouble passing an ADODB.Recordset from a VB6 application to a VB.Net class library using COM Interop. I am running this on XP SP2 with the .Net Framework 1.1 and MDAC 2.8 SP1. I've...
0
by: adam | last post by:
I am getting an error when trying to use an ADODB.Recordset that was passed from a VB6 application to a VB.Net class library using COM Interop. I am running this on WinXP SP2 using the .Net...
19
by: Adam Short | last post by:
I am trying to write a routine that will connect a .NET server with a classic ASP server. I know the following code doesn't work! The data is being returned as a dataset, however ASP does not...
1
by: ronvhill | last post by:
I am encountering an error on the following code. Basically, I have two queries which I am using to enter new records into two other tables, one a master and the other a child. Function...
1
by: dave | last post by:
I'm classic ASP developer and trying to switch to .net ...I'm newbie to ..net... In classic ASP for ADO connectivity i used to put below code in one separate file and used to include that file...
2
by: barret bonden | last post by:
(closest newsgroup I could find) Error Type: ADODB.Recordset (0x800A0CB3) Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype....
9
by: Johnfli | last post by:
ADODB.Recordset error '800a0cb3' Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype. I am moving my webserver from NT4 using SQL...
17
by: TC | last post by:
I love ADO.NET, but I find OLEDB to be unacceptably slow. The last time I tried to use a Jet database for local data storage, I gave up and wrote my data to a binary flat file instead. This time, I...
3
by: Jennifer.Berube | last post by:
okay...so I got this login script and I edited it all and it seems to run fine...IE it listens to the script as far as permissions go when I place a restriction on a page and when you login it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.