Forum Home
Press F1
 
Thread ID: 28125 2002-12-11 10:20:00 ASP & Access & Hosting Help!! Erin Salmon (626) Press F1
Post ID Timestamp Content User
105152 2002-12-11 21:57:00 Hi,

Yeah, "object required" is obviously the important thing here, but all my variables have been declared, here's the whole thing...

<%Option Explicit%>
<%
Dim Updated, CurrentTime, CurrentDate, Connect, OnDates, TotalCost
CurrentTime = Time
CurrentDate = Date
Connect="PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE="
Connect=Connect&Server.MapPath("\_database\parts1.mdb")
Connect=Connect&";Jet OLEDBatabase Password=password;"
Set OnDates = Connect.Execute("SELECT * FROM Dates")
Updated =OnDates("Date")
%>

There is a bit more below, but that's all the relevant code.

So looking at the big picture, what's the problem?

:)

Erin
Erin Salmon (626)
105153 2002-12-11 22:17:00 I've seen that code before CyberChuck... it must've been some of the first source code I used to use a server map and password instead of a DSN name. You really should respect peoples code... agent (30)
105154 2002-12-11 23:03:00 &lt;snip&gt;
I've seen that code before CyberChuck... it must've been some of the first source code I used to use a server map and password instead of a DSN name. You really should respect peoples code...
&lt;/snip&gt;

???? Are you claiming he stole your codes?
nzStan (440)
105155 2002-12-12 00:22:00 Well this is what W3Schools use on this page (www.w3schools.com)


<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"
%>


Ofcourse you can then convert the absolute path into the Server.MapPath command.
-=JM=- (16)
105156 2002-12-12 04:03:00 Is it the dreaded case sensitivity ?

Microsoft.blah.... versus MICROSOFT.BLAH....

Just a thought from my vast stores of ignorance :D
Graham L (2)
105157 2002-12-12 04:12:00 Hi,

Thank goodness Graham, when I saw your name on the email notification I suspected you'd tell me to give up and learn PHP...

:)

No problem there, ASP is not case sensitive.

As a matter of fact, I think I've got that problem sorted. It now works (sporadically, and for no particularly good reason, on some pages only)...

I'm getting there.

However, I'm having trouble with a couple of other pages that use a SSI (server-side include) to define the connection string. I let my software write this bit of code, and I don't properly understand how it works, so I'm having more than a little trouble modifying it for the new system.

However, I just had a major breakthrough with the message "Connection established successfully" when I tested the last connection string. I've yet to test it in the real-world, but if it works I'm going to call a stop for breakfast!

(It's 5PM)

:D

Erin
Erin Salmon (626)
105158 2002-12-12 04:37:00 Howdy,

Decided against breakfast - I'm having trouble with this seemingly innocent piece of code:

Casex = Connect . Execute("SELECT CaseName FROM Case WHERE CasePerformance="&CasexVal&"")

"CaseName" is a field on the table "case" as is "CasePerformance" .
CasexVal is a number between 1 and 3 generated by the preceeding lines of code .

It gives the error:

Microsoft JET Database Engine error '80040e14'

Syntax error in FROM clause .

/unleash/Computers_Custom_Method1P2 . asp, line 129

This was working flawlessly on PWS a week ago using an ODBC connection .

Any ideas?

Cheers,

Erin
Erin Salmon (626)
105159 2002-12-12 04:40:00 A small warning - Peter at 2day.com gets a trifle techy when bad code slows the server down.

I subscribed to the asp list (that I showed above) when it first came out and still get it. Questions there range from the simple to the complex. Often it's a comma or something similar that causes the problems and the people on the list are really good about helping.

As you are into ASP it would be worthwhile joining it.

Heather
Heather P (163)
105160 2002-12-12 04:44:00 Hi,

Yeah, I'm testing the code on my own machine for the time being. However, as there doesn't seem to be anything wrong with the SQL (it works fine in Access) I think I'll upload it. It's not an open loop or anything, so it wont run the server into the ground...

:)

Erin
Erin Salmon (626)
1 2