Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 132,301 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,012 people online right now. Registration is fast and FREE... Join Now!




Automation Error

 
Reply to this topicStart new topic

Automation Error, Error while opening a recordset

nealgabriel45
post 20 Feb, 2008 - 12:56 AM
Post #1


New D.I.C Head

Group Icon
Joined: 22 Oct, 2007
Posts: 46



Dream Kudos: 50
My Contributions


Hi All,
I am facing one error while tryin to open a table in access from VB
The error is as follows

Run-time error '-2147467259(80004005)':
Method 'Open' of object '_Recordset' Failed

Below is the code for the same

CODE

rsAdd.Open strQuery, g_objData.m_dbConn, adOpenStatic, adLockOptimistic

where
strQuery = strQuery = "Select top 1 * from Connection order by SubscriberCode desc"
g_objData.m_dbConn = Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=D:\Neal Gabriel\Others\Asianet\Database\Master.mdb;Mode=Share Deny None;Extended Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database Password=samtron;Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False
-------------------------------------------------------------------------------------------

What can be cause of this. I 've been using the same code for the past 3 years; This is the first time i am experiencing an error like this. Please lemme knw a solution for the same. Thanks in advance

User is offlineProfile CardPM

Go to the top of the page

PsychoCoder
post 20 Feb, 2008 - 05:01 AM
Post #2


using DIC.Core;

Group Icon
Joined: 26 Jul, 2007
Posts: 8,923



Thanked 118 times

Dream Kudos: 8475

Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions


From the looks of the stack trace it appears you're using VB.Net? If so, why are you using legacy libraries, such as Recordset, with VB.Net?
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 01:46AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month