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