[thelist] SQL Server default db with ancient ASP
Peter Brunone (EasyListBox.com)
peter at easylistbox.com
Thu Dec 28 16:01:25 CST 2006
Hi Max,
Just grasping at straws here, but what if you (a) remove the spaces after the semicolons, and (b) change "Data Source" to "
ServerName"?
Peter
----------------------------------------
From: Max Schwanekamp <lists at neptunewebworks.com>
Sent: Thursday, December 28, 2006 1:22 AM
To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
Subject: [thelist] SQL Server default db with ancient ASP
Hello all,
We have an old ASP/VB site based on Win2k 2003 and MSSQL 2k housed on a
shared host, accessed rarely and by staff only. I haven't done any ASP
in eons, so I must be missing something obvious. My problem is that the
default database indicated by the initial connection does not seem to be
getting selected, forcing all queries to prefixed with the database
name. When the site was active, living on a Win2K Server with MSSQL 2k,
this was not necessary.
I have an include file at the top of all site pages, which has this:
1 then
'error handling...
end if
%>]]>
This works fine, except that it seems that the Initial Catalog is
getting ignored. For queries to work, I must prefix all table
references with the database name. For example this code immediately
following the above:
]]>
This will error out with "Invalid object name 'mytable'." But if I
change that query to:
]]>
It works as expected. Any suggestions to solve this? I'm trying to
avoid having to edit all the queries in the code because A) it's time
consuming drudgery, and B) the client is unwilling to pay for it.
TIA.
--
Max Schwanekamp
NeptuneWebworks.com
541-517-9064
--
* * Please support the community that supports you. * *
http://evolt.org/help_support_evolt/
For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !
More information about the thelist
mailing list