473,698 Members | 2,047 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Run time error 3251

15 New Member
Good day,
I hope you guys could help me do something about this problem, it seems like I forgot the right codes to use :D

Dim adoRS as new ADODB.Connectio n
Dim recRS as Recordset


adoRS.Open "Provider=SQLOL EDB.1;Persist Security Info=False;User ID=User;Initial Catalog=Dbase;D ata Source=DBase", "user", "Password"
Set recRS = adoRS.Execute(" select * from TableName")

But when I try to update the table. It returns an error 3251

Hope you guys could help me out on this problem

TIA
Jul 25 '07 #1
2 2142
hariharanmca
1,977 Top Contributor
Good day,
I hope you guys could help me do something about this problem, it seems like I forgot the right codes to use :D

Dim adoRS as new ADODB.Connectio n
Dim recRS as Recordset


adoRS.Open "Provider=SQLOL EDB.1;Persist Security Info=False;User ID=User;Initial Catalog=Dbase;D ata Source=DBase", "user", "Password"
Set recRS = adoRS.Execute(" select * from TableName")

But when I try to update the table. It returns an error 3251

Hope you guys could help me out on this problem

TIA


Run-time error '3251'

i think this will help you
Jul 25 '07 #2
fplesco
82 New Member
Good day,
I hope you guys could help me do something about this problem, it seems like I forgot the right codes to use :D

Dim adoRS as new ADODB.Connectio n
Dim recRS as Recordset


adoRS.Open "Provider=SQLOL EDB.1;Persist Security Info=False;User ID=User;Initial Catalog=Dbase;D ata Source=DBase", "user", "Password"
Set recRS = adoRS.Execute(" select * from TableName")

But when I try to update the table. It returns an error 3251

Hope you guys could help me out on this problem

TIA

Hello kazper -

This could be your problem
Expand|Select|Wrap|Line Numbers
  1. Dim adoRS as new ADODB.Connection
  2. Dim recRS as Recordset
  3.  
Change the latter declaration to
Expand|Select|Wrap|Line Numbers
  1. Dim recRS As ADODB.Recordset
  2.  
I hope this would solve your issue.

Godspeed...
Jul 27 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
16546
by: (Pete Cresswell) | last post by:
I posted this in the MS Access group, but no luck. ------------------------------------------ I've got another stored procedure in the same app that returns multiple recordsets and the code works. But now I've written another SP and the code traps out with the 3251 message. The SP is writing two recordsets. When I run the SP in Query Analyzer, both recordsets appear.
10
11833
by: Frusterated | last post by:
Hi, I'm using Access-2k under Win-XP... When I have a form with imbedded code it works perfect. Such as the following code example. Dim db as DAO.Database Dim rs as DAO.Recordset Set db = CurrentDB set rs = db.OpenRecordset("MyTable")
2
11943
by: Alex Wisnoski | last post by:
I have an A97 application that I am modifying. I have created an unbound form, "zfrmTestEnterPlacements", with a subform, "zsfrmSelectPlacement". The intent is to use a combo box on the primary form to look up 'exhibitor-entry' data and populate a few fields on this form. The EntryID(number-long data type) will be passed to a textbox on the subform. The user will then use a combo box on the subform to look up the appropriate ...
3
4301
by: RBohannon | last post by:
I've developed a database in Access 2000 on Windows 2000. I have been asked to put the database on a machine running Windows XP. I copied the database onto the XP machine with some data already in it. Everything seemed to be working correctly, until I tried to import new data. New data is imported into the database from a floppy disk. To prevent duplicate entries, I have a boolean function called Exists which uses the Seek method of...
1
3598
by: Alfonso Morra | last post by:
Hi I'm compiling some code and need to generate some random numbers. To save time, I decided to use the srand, rand and time functions. My code worked (atleast built fine) until I added time.h, then the compiler (VC7.1) barfed up this lot: c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\time.h(156) : error C2143: syntax error : missing ',' before '*' c:\Program Files\Microsoft Visual Studio .NET
9
3510
by: ThunderMusic | last post by:
Hi, I'd like to create a compile time error in my class... maybe there's a way already built in in the framework so I can achieve what I want... I have 2 constructors in my class. One of them has mandatory parameters, I mean, they should not be null nor empty (for strings). So I'd make the validation in the constructor and generate a compile-time error if the validation does not match... Is there a way to achieve this or to specify...
1
9442
by: ydprasad | last post by:
I am trying to convert the code that was written in VB using DAO to ADO. But when i tried to do following getting an error '3251'. *************code************************** Dim cn As New ADODB.Connection cn.Open "Driver={Microsoft Access Driver (*.mdb)};Dbq=c:\Website Projects\ExitCashFlow\logMaster\Logs.mdb;" dim recdcath as adodb.recordset
10
6761
richardhodge
by: richardhodge | last post by:
I am a VB6 database programmer and have run into a small problem. The company I work for primarily uses Microsoft Access 2000 for the database that is the back end for our software. Well the functionality that I am currently working on creates a table in one database and then links it into the primary database that is used by the program to store and retrieve data from. Here's the problem. I can create the table fine but when I go to link the...
4
2971
by: ahmurad | last post by:
Dear Xperts, In my database table some fault code type records are inserted and the values are like bellows: Error:2/FC:10; 00:15:13 16/03/2009; Error:2/FC:20; 00:15:15 16/03/2009; Error:2/FC:30; 00:15:16 16/03/2009; Error:2/FC:40; 00:15:20 16/03/2009; Error:3/FC:3; 00:20:13 16/03/2009;
0
8674
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2328
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.