Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > BOOK: VBScript Programmer's Reference, 1st, 2nd, and 3rd editions
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: VBScript Programmer's Reference, 1st, 2nd, and 3rd editions
This is the forum to discuss the Wrox book VBScript Programmer's Reference, 3rd Edition by Adrian Kingsley-Hughes, Kathie Kingsley-Hughes, Daniel Read; ISBN: 9780470168080
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: VBScript Programmer's Reference, 1st, 2nd, and 3rd editions section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 26th, 2007, 09:19 AM
Registered User
 
Join Date: Apr 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can't Create RecordSet from Access conneciton

Here's my code, Please help on why I get the error listed below:


Set cnUsers = CreateObject("ADODB.Connection")

cnUsers.ConnectionString = "Provider= Microsoft.Jet.OLEDB.4.0;" & _
                            "User ID = Admin;Password=;" & _
                            "Data Source=c:\poc.mdb"

'WScript.Echo(cnUsers.ConnectionString)

cnUsers.Open

Set rsUsers = CreateObject("ADODB.Recordset")
strSQL = "SELECT [Officer_Num,User_Id,FName,FName,MI] FROM USERS"
Set rSUsers = cnUsers.Execute(strSQL)



The error I get is:
H:\Scripts\NEW AD USER STUB.vbs(48, 1) Microsoft JET Database Engine: No value given for one or more required parameters.


Line 48 is: Set rSUsers = cnUsers.Execute(strSQL)


In the line:
strSQL = "SELECT [Officer_Num,User_Id,FName,FName,MI] FROM USERS"

everything between the [...] is in the same case as it appears in the Access DB.
Help Please!


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to access a recordset without connection? JelfMaria VB How-To 9 June 30th, 2005 12:01 AM
Recordset Pagination (ASP Access) darinsee Classic ASP Databases 9 September 24th, 2004 05:30 PM
ADO Recordset to Access MDB sasidhar79 SQL Server ASP 1 June 23rd, 2004 02:15 AM
Create a dynamic variable from a recordset tdaustin Classic ASP Basics 3 May 13th, 2004 11:04 PM
Recordset date insert in access kev_79 Access ASP 3 June 5th, 2003 12:49 PM



All times are GMT -4. The time now is 09:16 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.