473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

problem on a recordset for a ADODB connection.

15
I'm having trouble getting the right code for the record set.

Dim adoItems As New ADODB.Connection
Dim recItems As New ADODB.Recordset

adoItems.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=MyUserID;Data Source=MyDataSource;Initial Catalog=MyCatalog"

adoItems.Open ("DSN=MyDSNName;UID=MyUserID;Pwd=MyPassword")


my real problem is getting the right recordset for recItems for my adodb connection.

Hope you guys can help me out..

Thanks in Advance
Jan 26 '07 #1
3 1220
willakawill
1,646 1GB
I'm having trouble getting the right code for the record set.

Dim adoItems As New ADODB.Connection
Dim recItems As New ADODB.Recordset

adoItems.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=MyUserID;Data Source=MyDataSource;Initial Catalog=MyCatalog"

adoItems.Open ("DSN=MyDSNName;UID=MyUserID;Pwd=MyPassword")


my real problem is getting the right recordset for recItems for my adodb connection.

Hope you guys can help me out..

Thanks in Advance
Hi. If I knew what recordset you wanted I could help you, but I don't as you did not say what you want to do.
You are showing 2 connection strings for your connection object. If you set the connection string first, you don't need a parameter for the call to open.

If you are just looking for a generic way to open a recordset then you need a SQL string

Expand|Select|Wrap|Line Numbers
  1. Set recItems = adoItems.Execute("SELECT * FROM MyTable")
Jan 26 '07 #2
kazper
15
Thanks for the code :) that was the code that i needed ;) thanks alot
Jan 26 '07 #3
willakawill
1,646 1GB
Thanks for the code :) that was the code that i needed ;) thanks alot
Welcome :)
Jan 26 '07 #4

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

Similar topics

7
by: Navin | last post by:
hi, i am using the follwoing code to write a recordset to a csv file 'fcreateFile -file system object Do While Not oRs.EOF fcreateFile.Write(oRs.GetString(,1000,",",vbcrlf,"")) 'Write Login...
4
by: Max | last post by:
Hello. This is the first time I've posted to a newsgroup, and I do this because I'm in desperate need of help. I'm working a user management system, and when I activate a user that has registered...
6
by: HKM | last post by:
Hello, I have a query engine that builds the SQL Query to obtain the recordSet. Following is an Exmaple Query that my QueryBuilder outputted SELECT * FROM BookInfo WHERE BookName LIKE...
2
by: Joseph Markovich | last post by:
I'm having some trouble with VB in Access 2000. I have a form that the user enters in just one number (in this case, it's a base salary) and then the program is going to do a bunch of math (which...
0
by: jayohare | last post by:
Hello, I have code within my DB application to process credit cards through authorize.net. Ive been using the same code for several years without a problem. I have an order entry computer and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.