Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 26th, 2007, 09:19 AM
Registered User
 
Join Date: Apr 2007
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!







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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.