two tables in one database, different result

This is a discussion on "two tables in one database, different result" within the Classic ASP section. This forum, and the thread "two tables in one database, different result are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 20th, 2006, 17:55
Junior Member
Join Date: Apr 2006
Location: UK
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
two tables in one database, different result

hi,

i just found out something wrong with my database. when i try to use asp to get access to one table in database to retrieve all values in it, I succed.

however, when i try with another table, it suddenly appears below error message:

(0x80004005)
Unspecified error
/Public/example.asp, line 24



can anyone suggest what's wrong with this? i think it might come from the relationship of the table but i really cannot see anything wrong with it (i can do this with microsoft access but when in asp, it is not possible )
Reply With Quote

  #2 (permalink)  
Old Apr 20th, 2006, 20:03
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,955
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Re: two tables in one database, different result

Post Your Code
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
  #3 (permalink)  
Old Apr 20th, 2006, 20:42
Junior Member
Join Date: Apr 2006
Location: UK
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Re: two tables in one database, different result

Code: Select all
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<%
    Dim Rst, DBConn, strSQL, id
%>
<body>
<%
    Set DBConn = Server.CreateObject("ADODB.Connection")
    DBConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("/") & "/../WEB_ROOT/Database/wad.mdb" & ";"
    
    strSQL = "SELECT PositionID FROM Position"

    Set Rst = Server.CreateObject("ADODB.RecordSet")
    Set Rst = DBConn.Execute(strSQL)
    While Not Rst.EOF
        Response.Write Rst("PositionID") & "<BR>"
        Rst.MoveNext
    Wend
    Rst.Close
    Set Rst = Nothing
    DBConn.close
    Set DBConn = Nothing    
    
%>
</body>
</html>
this is my code to check the two tables, when I switch the "Position" in the strSQL statement by something else, more specifically, some other tables in the database, they work find when I try to RESPONSE.WRITE RST(""). However, when I test with Position, it just says that error. Really weird and ...weird.

Thanks for reading, Rob
Reply With Quote
  #4 (permalink)  
Old Apr 20th, 2006, 22:37
Junior Member
Join Date: Apr 2006
Location: UK
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Re: two tables in one database, different result

thanks for this, but i found out the error.
ASP does not like Position, should be somethine else.

Working perfectly.
Reply With Quote
  #5 (permalink)  
Old Apr 20th, 2006, 23:46
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,955
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Re: two tables in one database, different result

ok..... just as a pointer for future errors, ALWAYS POST YOUR CODE.

For future reference, here is a list of RESERVED words when using the JET ENGINE:-

A

ABSOLUTE ACTION ADD ADMINDB
ALL ALLOCATE ALPHANUMERIC ALTER
AND ANY ARE AS
ASC ASSERTION AT AUTHORIZATION
AUTOINCREMENT AVG


B

BAND BEGIN BETWEEN BINARY
BIT BIT_LENGTH BNOT BOR
BOTH BXOR BY BYTE


C

CASCADE CASCADED CASE CAST
CATALOG CHAR CHARACTER CHAR_LENGTH
CHARACTER_LENGTH CHECK CLOSE COALESCE
COLLATE COLLATION COLUMN COMMIT
COMP COMPRESSION CONNECT CONNECTION
CONSTRAINT CONSTRAINTS CONTAINER CONTINUE
CONVERT CORRESPONDING COUNT COUNTER
CREATE CREATEDB CROSS CURRENCY
CURRENT CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP
CURRENT_USER CURSOR


D

DATABASE DATE DATETIME DAY
DEALLOCATE DEC DECIMAL DECLARE
DEFAULT DEFERRABLE DEFERRED DELETE
DESC DESCRIBE DESCRIPTOR DIAGNOSTICS
DISALLOW DISCONNECT DISTINCT DOMAIN
DOUBLE DROP


E

ELSE END END-EXEC ESCAPE
EXCEPT EXCEPTION EXCLUSIVECONNECT EXEC
EXECUTE EXISTS EXTERNAL EXTRACT


F

FALSE FETCH FIRST FLOAT
FLOAT4 FLOAT8 FOR FOREIGN
FOUND FROM FULL


G

GENERAL GET GLOBAL GO
GOTO GRANT GROUP GUID


H

HAVING HOUR


I

IDENTITY IEEEDOUBLE IEEESINGLE IGNORE
IMAGE IMMEDIATE IN INDEX
INDICATOR INHERITABLE INITIALLY INNER
INPUT INSENSITIVE INSERT INT
INTEGER INTEGER1 INTEGER2 INTEGER4
INTERSECT INTERVAL INTO IS
ISOLATION


J

JOIN


K

KEY


L

LANGUAGE LAST LEADING LEFT
LEVEL LIKE LOCAL LOGICAL
LOGICAL1 LONG LONGBINARY LONGCHAR
LONGTEXT LOWER


M

MATCH MAX MEMO MIN
MINUTE MODULE MONEY MONTH


N

NAMES NATIONAL NATURAL NCHAR
NEXT NO NOT NOTE
NULL NULLIF NUMBER NUMERIC


O

OBJECT OCTET_LENGTH OF OLEOBJECT
ON ONLY OPEN OPTION
OR ORDER OUTER OUTPUT
OVERLAPS OWNERACCESS


P

PAD PARAMETERS PARTIAL PASSWORD
PERCENT PIVOT POSITION PRECISION
PREPARE PRESERVE PRIMARY PRIOR
PRIVILEGES PROC PROCEDURE PUBLIC


Q



R

READ REAL REFERENCES RELATIVE
RESTRICT REVOKE RIGHT ROLLBACK
ROWS


S

SCHEMA SCROLL SECOND SECTION
SELECT SELECTSCHEMA SELECTSECURITY SESSION
SESSION_USER SET SHORT SINGLE
SIZE SMALLINT SOME SPACE
SQL SQLCODE SQLERROR SQLSTATE
STRING SUBSTRING SUM SYSTEM_USER


T

TABLE TABLEID TEMPORARY TEXT
THEN TIME TIMESTAMP TIMEZONE_HOUR
TIMEZONE_MINUTE TO TOP TRAILING
TRANSACTION TRANSFORM TRANSLATE TRANSLATION
TRIM TRUE


U

UNION UNIQUE UNIQUEIDENTIFIER UNKNOWN
UPDATE UPDATEIDENTITY UPDATEOWNER UPDATESECURITY
UPPER USAGE USER USING


V

VALUE VALUES VARBINARY VARCHAR
VARYING VIEW


W

WHEN WHENEVER WHERE WITH
WORK WRITE


X



Y

YEAR YESNO


Z

ZONE
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
  #6 (permalink)  
Old Apr 20th, 2006, 23:59
Junior Member
Join Date: Apr 2006
Location: UK
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Re: two tables in one database, different result

wow
this is so cool man, thanks a lot. this solves a lot of problem for me, seriously.

cheers,
Reply With Quote
Reply

Tags
two, tables, database, different, result

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Formating php output result dhossai PHP Forum 3 Oct 26th, 2007 23:08
can create database but not tables saltedm8 Databases 28 Sep 16th, 2007 19:31
Displaying MySQL database tables on a page vandiermen PHP Forum 3 Jun 30th, 2007 21:58
Returning result from db as a hyperlink lobster1983 PHP Forum 2 Sep 18th, 2005 19:59
ASP Result Field djaccess Classic ASP 6 Aug 28th, 2003 16:17


All times are GMT. The time now is 17:12.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43