Quote:
quote:You have to create the connection first before you open the recordset:
'Create connection object and open it
Set objCnn = Server.CreateObject ("ADODB.Connection")
objCnn.Open strConnect
|
Well, this not entirely true. You can pass a connection string to the Open method as well (see:
http://msdn.microsoft.com/library/de...mdamth03_2.asp for details):
Code:
recordset.Open Source, ActiveConnection, CursorType, LockType, Options
ActiveConnection
Optional. Either a Variant that evaluates to a valid Connection
object variable name, or a String that contains ConnectionString
parameters.
But how does the rest of your code look like? A page not found is a bit odd. Are you redirecting away from the page when there is no record?
Maybe you need to enable detailed error messages for both the browser and the server. For your browser (IE), open the Internet options, and then the advanced tab. Disable "Show friendly http error messages"
You may also need to enable sending more detailed info from the server to the browser when an error occurs. What Web server are you using? Do you use an ISP or your own server?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.