Solved

SQl2000 / VB6 ADO, cryptacquirecontext error

Posted on 2002-07-01
8
522 Views
Last Modified: 2007-12-19

Hi Guys

Having a problem where i'm happily running my VB6 application against a sql2000 database.

My VB6 application will do a certain number iterations (reading from a recordset, and then inserting records into a table), and then it
will fall over with the following error message.

Run Time Error ='2147467259 (80004005)' :

CryptoAPI function 'CryptAcquireContext' failed. Error 0x8009001d:
(Error description unavailable)

At this point, I try closing the ADO connection, and re-opening, and I get the same error.

Whenever I try to load another windows program (i.e. Windows Explorer), I get a 'not enough memory to load program' error

I know that I have memory avaliable, (at least 80mb is being reported in the 'Free Physical Memory').

If I try running the SQL Insert statment in SQL Query Analyser, the insert works perfectly. (And I can also disconnect / reconnect to the SQL Server)

The only way to get my VB6 App to run the SQL Insert line is to stop the SQL Server process, and re-start it.

Obviously this is not a great solution, as my code is running on a client's machine which I do not have control over.

I've looked on newsgroups, and forums, and have come across a few references to this problem, yet none of them have had definative answers.


Can anybody help me please?????


Steve
0
Comment
Question by:sb8gq
8 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7121626
This what i found:
http://dbforums.com/archive/68/2001/10/4/181489

I think that you have the protocol encryption enabled, which uses the CryptoAPI. Unless you need this, you should disable it.
Independently of this, I could solve some problems with the CryptoAPI by
1) ensuring every user had full permissions to all the Crypto Hives in the registry
2) ensuring that no invalid/unknown users existed in the registry permissions for that hives.

CHeers
0
 
LVL 1

Author Comment

by:sb8gq
ID: 7121646
Thanks for replying so quickly.

I'm not explicity using the Crypto API, so how do I disable the protocol encryption??


Cheers
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 400 total points
ID: 7121651
Start the "Server Network Utility" on the "Microsoft SQL Server" menu (Start->Program Files  is the default location). You will find the option in the first tab.

CHeers
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 1

Author Comment

by:sb8gq
ID: 7125332
The option there does not allow you to explicitly set 'no encryption', only to enforece encryption.

I have tried various protocols and still no luck :(

Steve
0
 
LVL 1

Author Comment

by:sb8gq
ID: 7125436
The option there does not allow you to explicitly set 'no encryption', only to enforece encryption.

I have tried various protocols and still no luck :(

Steve
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8451612
Upon review of the comments here, I am recommending this disposition:

        points to angelIII

Please post a comment if you disagree.

DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 8492645
per recommendation.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now