1

I am creating a web application in Dreamweaver using ASP VBScript. The web application is a store and I have to implement a database into it (which I did). I created a table in my database called order and for some reason I couldn't dynamically enter the data from a record set that I wanted to.

I searched on Google and came across someone saying that order is a reserved word and that I should name my table something else. I did so (several times, several names, and even new tables with the same fields, thinking I could use this table, no joy.) But ever since, whenever I try to create a new recordset I am only picking up the old table (the one named order, the other two table are working fine).

a busy cat

I couldn't see the new renamed table fields when creating a recordset no matter how much I refreshed the database window.

a busy cat

I am able to access the database that I want to use when I double click the database through Local view or Remote View (I can't find the old DB anywhere). The problems arise when I want to use the data from the order recordset (since this is the recordset it is forcing me to use even though I can't). I am getting this error when I press on the + button of the recordset that is related to the order table

[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.

So when I go and change this code to the name of an existing table in my DB (which is now orders) I then get this error

[Microsoft][ODBC Microsoft Access Driver] The Microsoft Office Access database engine cannot find the input table or query 'Orders'. Make sure it exists and that its name is spelled correctly' .

Here's the DB:

a busy cat

Here's the code where the problem is:

<!--#include file="Connections/cnFreshNew.asp" -->
<%
Dim rsProducts
Dim rsProducts_cmd
Dim rsProducts_numRows

Set rsProducts_cmd = Server.CreateObject ("ADODB.Command")
rsProducts_cmd.ActiveConnection = MM_cnFreshNew_STRING
rsProducts_cmd.CommandText = "SELECT * FROM Products" 
rsProducts_cmd.Prepared = true

Set rsProducts = rsProducts_cmd.Execute
rsProducts_numRows = 0
%>
<%
Dim rsUsers
Dim rsUsers_cmd
Dim rsUsers_numRows

Set rsUsers_cmd = Server.CreateObject ("ADODB.Command")
rsUsers_cmd.ActiveConnection = MM_cnFreshNew_STRING
rsUsers_cmd.CommandText = "SELECT * FROM Users" 
rsUsers_cmd.Prepared = true

Set rsUsers = rsUsers_cmd.Execute
rsUsers_numRows = 0
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows

Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_cnFreshNew_STRING
Recordset1_cmd.CommandText = "SELECT * FROM Orders" 
Recordset1_cmd.Prepared = true

Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>

I can't create a brand new DB and start over because I need my lectures login credentials as it is on the college's server and it's a bit too late to do that now, sadly.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.