Showing posts with label vb6. Show all posts
Showing posts with label vb6. Show all posts

Sunday, February 26, 2012

Error Message with Recordset.Update

Hi,

I am converting a VB6 application to C# using ADO. I have the following code:

private ADODB.Connection cn = new ADODB.Connection();
private ADODB.Recordset rs = new ADODB.Recordset();

private connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data source= " + stdDir;
strClientSQL = "SELECT * FROM Client ORDER BY casename, renldate, product, fundingcode";

cn.CursorLocation = ADODB.CursorLocationEnum.adUseClient;
cn.Open(Utilities.connectionString,null,null,0);

rs.CursorLocation = ADODB.CursorLocationEnum.adUseServer;
rs.Open(strClientSQL,cn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic,-1);

rs.Fields["CaseName"].Value = this.txtCaseName.Text;

rs.Fields["CaseNo"].Value = this.txtCaseNumber.Text;

rs.Update();

When I try to compile and run it I get the following error message:

"No overload for method 'Update' takes '0' arguments"

I am not sure if I need to enter information in the update command or do something else. This seems pretty straight forward but I can't figure out how to do it. Can someone please help me?

Thanks,

Mark

The thing is that you have to place the fieldas and its values in the function, like this:

rsMsg.Update("Field1,Field2,Field3", "Value1,Value2,Value3");

But i supossed that you want to update the whole recordset, am i rigth?
That's a good question.... give me some time to answer that.

Hugo|||try without the parenthesis

rs.Update

Error Message with Recordset.Update

Hi,

I am converting a VB6 application to C# using ADO. I have the following code:

private ADODB.Connection cn = new ADODB.Connection();
private ADODB.Recordset rs = new ADODB.Recordset();

private connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data source= " + stdDir;
strClientSQL = "SELECT * FROM Client ORDER BY casename, renldate, product, fundingcode";

cn.CursorLocation = ADODB.CursorLocationEnum.adUseClient;
cn.Open(Utilities.connectionString,null,null,0);

rs.CursorLocation = ADODB.CursorLocationEnum.adUseServer;
rs.Open(strClientSQL,cn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic,-1);

rs.Fields["CaseName"].Value = this.txtCaseName.Text;

rs.Fields["CaseNo"].Value = this.txtCaseNumber.Text;

rs.Update();

When I try to compile and run it I get the following error message:

"No overload for method 'Update' takes '0' arguments"

I am not sure if I need to enter information in the update command or do something else. This seems pretty straight forward but I can't figure out how to do it. Can someone please help me?

Thanks,

Mark

The thing is that you have to place the fieldas and its values in the function, like this:

rsMsg.Update("Field1,Field2,Field3", "Value1,Value2,Value3");

But i supossed that you want to update the whole recordset, am i rigth?
That's a good question.... give me some time to answer that.

Hugo|||try without the parenthesis

rs.Update

Friday, February 17, 2012

Error Message : Your SQL server installation is either corrupt or

Hi all,
I recently upgraded to visual studio 2005 professional from VB6 and sql
server 2000.
I got the latest updates and rebooted my machine and when it boots up i get
the following error message " Your SQL server installation is either corrupt
or has been tampered with (unknown package id). Please rerun setup.
OK - did that. The same error message reappeared. I have then removed visual
studio and sql server 2005 developer edition and sql server 2000 and then
rebooted mahcine. Same error message. Have reinstalled everything and the
same thing keeps reoccuring - DO i need to remove some registry entries or a
file of the machine so that this message dissapears.
TIA JustinOpen up your browser and visit the following site, it'll sove your issue
probably.
http://support.microsoft.com/default.aspx?scid=kb;en-us;290301
--
Ekrem Ã?nsoy
MCBDA, MCTS: SQL Server 2005, MCITP:DBA, MCSD.Net, MCSE, MCT
"Justin" <Justin@.discussions.microsoft.com> wrote in message
news:68E56E56-EFF1-4F14-B887-2EE0ED8F5B45@.microsoft.com...
> Hi all,
> I recently upgraded to visual studio 2005 professional from VB6 and sql
> server 2000.
> I got the latest updates and rebooted my machine and when it boots up i
> get
> the following error message " Your SQL server installation is either
> corrupt
> or has been tampered with (unknown package id). Please rerun setup.
> OK - did that. The same error message reappeared. I have then removed
> visual
> studio and sql server 2005 developer edition and sql server 2000 and then
> rebooted mahcine. Same error message. Have reinstalled everything and the
> same thing keeps reoccuring - DO i need to remove some registry entries or
> a
> file of the machine so that this message dissapears.
> TIA Justin

Wednesday, February 15, 2012

Error Message "Could not find server 'FLDB1' in sysservers....

I'm getting the following message from a VB6 program running ADO...

It will process a job then I get the message.... [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find server 'FLDB1' in syssservers. Execute sp_addlinkedserver to add the server to sysservers...

This started to happen after I moved the db from SS2000 to SS2005...

Our db server and sql server instance on that server are both named 'FLDB1'... Do I need to run the above execute sp_addlinkedserver command on the new 2005 server?

Thanks-Dave

Yes, that would be necessary since you most likely didn't migrate the list of linked servers.

Error Message

We are using ADO2.6,VB6.0, and SQLServer2000. There is a error message "Not
enough storage is available to complete this operation" when we try to
update a single row in a big table (more than 80 million records). We have
only see this message twice. Does anybody know what this error mean? At what
condition it could happen?
Thanks,
LijunHi Lijun
Is the transaction log full?
Cheers, David
>--Original Message--
>We are using ADO2.6,VB6.0, and SQLServer2000. There is a
error message "Not
>enough storage is available to complete this operation"
when we try to
>update a single row in a big table (more than 80 million
records). We have
>only see this message twice. Does anybody know what this
error mean? At what
>condition it could happen?
>Thanks,
>Lijun
>
>.
>|||David,
The transaction log is not full. I have allocated 30GB transaction log space
and the transaction log backup size is 70MB after the error message.
Lijun
"David" <anonymous@.discussions.microsoft.com> wrote in message
news:020c01c3b84f$4853e250$a501280a@.phx.gbl...
> Hi Lijun
> Is the transaction log full?
> Cheers, David
> >--Original Message--
> >We are using ADO2.6,VB6.0, and SQLServer2000. There is a
> error message "Not
> >enough storage is available to complete this operation"
> when we try to
> >update a single row in a big table (more than 80 million
> records). We have
> >only see this message twice. Does anybody know what this
> error mean? At what
> >condition it could happen?
> >
> >Thanks,
> >Lijun
> >
> >
> >.
> >|||Lijun, I don't know why this is happening - sorry. David.
>--Original Message--
>David,
>The transaction log is not full. I have allocated 30GB
transaction log space
>and the transaction log backup size is 70MB after the
error message.
>Lijun
>"David" <anonymous@.discussions.microsoft.com> wrote in
message
>news:020c01c3b84f$4853e250$a501280a@.phx.gbl...
>> Hi Lijun
>> Is the transaction log full?
>> Cheers, David
>> >--Original Message--
>> >We are using ADO2.6,VB6.0, and SQLServer2000. There is
a
>> error message "Not
>> >enough storage is available to complete this operation"
>> when we try to
>> >update a single row in a big table (more than 80
million
>> records). We have
>> >only see this message twice. Does anybody know what
this
>> error mean? At what
>> >condition it could happen?
>> >
>> >Thanks,
>> >Lijun
>> >
>> >
>> >.
>> >
>
>.
>|||Hi Lijun,
Thanks for your post. According to your description, it seems that this
error message does not occur regularly. This kind of randomly occurring
issue is not easy to troubleshoot, and is one whose root cause is difficult
to find out. Please check the suggestions in the following articles and see
if they address your problem.
182423 FIX: Error "Not Enough Storage Is Available" with ADO
http://support.microsoft.com/?id=182423
166840 Err Msg: Not Enough Storage to Complete Operation
http://support.microsoft.com/?id=166840
Please try to install the latest version of MDAC on your computer. You will
find the download link below.
Microsoft Data Access Components (MDAC) 2.7 Service Pack 1 Refresh
http://www.microsoft.com/downloads/details.aspx?FamilyID=9ad000f2-cae7-493d-
b0f3-ae36c570ade8&DisplayLang=en
When you update the table using Query Analyzer, does the error message
occur?
In addition, based on my experience, this issue is probably related to the
ado programming. It is best to discuss this issue in the
microsoft.public.vb.database.dao newsgroup. The
microsoft.public.vb.database.dao newsgroup is primarily for issues
involving ado programming. The reason why we recommend posting
appropriately is because you will then get the most qualified pool of
respondents, also, other partners who regularly read the newsgroups
regularly can either share their knowledge, or learn from your interaction
with us.
Thanks for using MSDN newsgroup. If you have any questions, please do not
hesitate to let me know.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.