This is my first post - yahoo!!!!!!!

Here are the facts, and the order of development:

I created an ASP. This ASP obtains data from a table from a
Mircrosoft Access Database, and creates a record set. The data in the
record set is then displayed to the user. Here is the code in my asp
associated with the recordset:

<%
' Declare variables
Dim adoCon 'Holds the Database Connection Object
Dim rsSCM_CSA 'Holds the recordset for the records in the
database
Dim strSQL 'Holds the SQL query for the database
Dim strSearch ' The text being looked for
%>


<%
'Create an ADO connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")

'Set an active connection to the Connection object using a DSN-less
connection
adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & "\\Rsev46-09\Share_04\Webpages\ENG
\D280\mydatabase.mdb"

'Obtain Filter for Query from form on webpage
strSearch = Request.QueryString("formsearchstring")

'Initialise the strSQL variable with an SQL statement to query the
database
strSQL = "SELECT Document_PIN, Document_Type, Document_Title FROM
Documents WHERE Document_Project = '" & strSearch & "'"

'Create an ADO recordset object
Set rsSCM_CSA = Server.CreateObject("ADODB.Recordset")

'Open the recordset with the SQL query
rsSCM_CSA.CursorLocation = 3
rsSCM_CSA.Open strSQL, adoCon, 0, 1
rsSCM_CSA.Sort = "Document_PIN"
%>

This all works just fine.

Now here is where the problem comes in. The database has been split.
With this, the tables in the database have changed to linked tables.
Now, the webpage does not open.

Has anybody had to deal with this problem before?
Anybody have a solution?

X X X X X X X X X X X X X X X X X X X X X X X X X

I hope it is leagal to ask two questions with one post. I'm using
Dreamweaver as my development environment for my ASP. Is there any
way to debug or set breakpoints, or display messages for me to know
how/when/where the server is processing my ASP?

Re: Need Solution For Retrieving Data From Linked Table by Bob

Bob
Fri Jun 27 11:57:07 CDT 2008

Voss Man wrote:
> This is my first post - yahoo!!!!!!!
>
> Here are the facts, and the order of development:
>
> I created an ASP. This ASP obtains data from a table from a
> Mircrosoft Access Database, and creates a record set. The data in the
> record set is then displayed to the user. Here is the code in my asp
> associated with the recordset:
>
> <%
> ' Declare variables
> Dim adoCon 'Holds the Database Connection Object
> Dim rsSCM_CSA 'Holds the recordset for the records in the
> database
> Dim strSQL 'Holds the SQL query for the database
> Dim strSearch ' The text being looked for
> %>
>
>
> <%
> 'Create an ADO connection odject
> Set adoCon = Server.CreateObject("ADODB.Connection")
>
> 'Set an active connection to the Connection object using a DSN-less
> connection
> adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> "Data Source=" & "\\Rsev46-09\Share_04\Webpages\ENG
> \D280\mydatabase.mdb"
>
> 'Obtain Filter for Query from form on webpage
> strSearch = Request.QueryString("formsearchstring")
>
> 'Initialise the strSQL variable with an SQL statement to query the
> database
> strSQL = "SELECT Document_PIN, Document_Type, Document_Title FROM
> Documents WHERE Document_Project = '" & strSearch & "'"
>
> 'Create an ADO recordset object
> Set rsSCM_CSA = Server.CreateObject("ADODB.Recordset")
>
> 'Open the recordset with the SQL query
> rsSCM_CSA.CursorLocation = 3
> rsSCM_CSA.Open strSQL, adoCon, 0, 1
> rsSCM_CSA.Sort = "Document_PIN"
> %>
>
> This all works just fine.
>
> Now here is where the problem comes in. The database has been split.
> With this, the tables in the database have changed to linked tables.
> Now, the webpage does not open.


No error messages? No nothing? Does your code have an "on error resume next"
line you haven't shown us? If so, comment it out so you can see the error
message and let us know what it is.
>
> Has anybody had to deal with this problem before?
> Anybody have a solution?


That said, ADO via ASP traditionally has problems with Access linked tables
(cue for someone to pop in saying "what are you talking about? I've had it
running fine for ages!"). I have seen several instances in this newsgroup
over the years where the original posters could never get it working. You
should probably consider connecting the database that contains the actual
tables rather than the one with the linked tables.

>
> X X X X X X X X X X X X X X X X X X X X X X X X X
>
> I hope it is leagal to ask two questions with one post. I'm using

It's not really a good idea (no legality involved - there's no newsgroup
monitor enforcing rules) - one question per post is the norm: it helps
people decide which posts they want to answer. What would have been so hard
about making a second post for this question?


> Dreamweaver as my development environment for my ASP. Is there any
> way to debug or set breakpoints, or display messages for me to know
> how/when/where the server is processing my ASP?

Outside of my stock "Dreamweaver sucks" reply, I have to say I don't know.
Doesn't Dreamweaver have any forums where you can ask this question?
I gave up trying to step through server-side code years ago. I once had it
working with Interdev, but then it stopped worrking and I could never get it
to work again. So, I have resorted to using "Response.Write" and
"Response.End" to debug with. You might look at this:
http://support.microsoft.com/kb/299986/EN-US/

Oh, and have I said that DW sucks? Oh, yes, I guess I have ... :-)

One last thing:
Your use of dynamic sql is leaving you vulnerable to hackers using sql
injection:
http://mvp.unixwiz.net/techtips/sql-injection.html
http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=23

A quick browse through this and the asp.db newsgroups should allow you to
find several people whose sites have been hacked by a new internet worm
going around that uses sql injection to deliver its payload. You should
really take this seriously.

See here for a better, more secure way to execute your queries by using
parameter markers:
http://groups-beta.google.com/group/microsoft.public.inetserver.asp.db/msg/72e36562fee7804e

Personally, I prefer using stored procedures, or saved parameter queries
as
they are known in Access:

Access:
http://www.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=e6lLVvOcDHA.1204%40TK2MSFTNGP12.phx.gbl

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1&selm=eHYxOyvaDHA.4020%40tk2msftngp13.phx.gbl

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"



Re: Need Solution For Retrieving Data From Linked Table by Mike

Mike
Fri Jun 27 14:07:21 CDT 2008


"Voss Man" <david.voss@sperry.ngc.com> wrote in message
news:748c6cae-c001-4f9e-a93a-fc565d8c5b42@a70g2000hsh.googlegroups.com...
> This is my first post - yahoo!!!!!!!
>

<snip the stuff Bob dealt with>

>
> I hope it is leagal to ask two questions with one post. I'm using
> Dreamweaver as my development environment for my ASP. Is there any
> way to debug or set breakpoints, or display messages for me to know
> how/when/where the server is processing my ASP?
>

No. DW doesn't. You can either Response.Write statements as Bob suggested,
or get hold of Visual Studio 2005 or 2008.

--
Mike Brind
Microsoft MVP - ASP/ASP.NET