Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Need some database help
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

denny
Starting Member

15 Posts

Posted - 10 August 2001 :  10:09:29  Show Profile
I'm making a script for my home page which takes information from a database.

When I run it, I get this error:


Microsoft VBScript compilation error '800a03ea'

Syntax error

/beta/admin.asp, line 30

objFoo.Open "SELECT * FROM home", objConn, , ,
----------------------------------------------^


objFoo = my recordset
objConn = my connection.

Bacisally, I want to know what goes into the commas. I've seen both numbers and word variables in those, and I'm Über-confused I'd appreciate some help from some database guru out there



Edited by - denny on 10 August 2001 10:10:24

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 10 August 2001 :  10:21:49  Show Profile  Visit Kat's Homepage
You don't need any commas afer the ObjConn for it to work.

KatsKorner
Go to Top of Page

denny
Starting Member

15 Posts

Posted - 10 August 2001 :  12:21:20  Show Profile
Ahhh... Thanks

______________
ProstheticHead
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 10 August 2001 :  23:04:13  Show Profile
From the MS documentation for an ado recordset:

Syntax
recordset.Open Source, ActiveConnection, CursorType, LockType, Options

Parameters

Source
Optional. A Variant that evaluates to a valid Command object, an SQL statement, a table name, a stored procedure call, a URL, or the name of a file or Stream object containing a persistently stored Recordset.

ActiveConnection
Optional. Either a Variant that evaluates to a valid Connection object variable name, or a String that contains ConnectionString parameters.

CursorType
Optional. A CursorTypeEnum value that determines the type of cursor that the provider should use when opening the Recordset. The default value is adOpenForwardOnly.

LockType
Optional. A LockTypeEnum value that determines what type of locking (concurrency) the provider should use when opening the Recordset. The default value is adLockReadOnly.

Options
Optional. A Long value that indicates how the provider should evaluate the Source argument if it represents something other than a Command object, or that the Recordset should be restored from a file where it was previously saved. Can be one or more CommandTypeEnum or ExecuteOptionEnum values, which can be combined with a bitwise AND
operator.


======
Doug G
======
Go to Top of Page

camusflage
Starting Member

USA
26 Posts

Posted - 14 August 2001 :  07:24:30  Show Profile
quote:

recordset.Open Source, ActiveConnection, CursorType, LockType, Options



Unless you've included adovbs.inc (or the relevant portions of it), remember that you need to use the Enum values, as it's in adovbs that includes the values of the constants used for cursortype, locktype, paramtype, etc.

Mike


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07