Re: Problems with Connection Strings



Thanks for the reply Adam.

I have referred to www.connectionstrings.com. In fact, I copied the OLE DB
Standard Security connection string from this site. No luck in figuring this
out. Could this possibly be a problem with the IIS configuration for the
site?

Thanks,
Rich

"Adam Sandler" wrote:

On Jun 14, 8:26 am, rich <r...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hello Everyone,

I am a newbie to web development. I am using FrontPage 2002/SP3 on XP and
IIS 6.0 on Win2K3 server. My Dev website is stored locally and I am
publishing to the IIS server.

I am attempting to connect to and query an Access database stored both
locally and on the IIS server. This is the code (and connection string that
I am using, (which I believe should be using the Microsoft Jet driver, pardon
if I am not 100% correct in this statement.)...

<%
dim oConn
dim strConn
dim strSQL
dim rs

Set oConn = CreateObject("ADODB.Connection")
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and
Settings\rks.RPS.002\My Documents\My
Webs\richweb\GSDtest\OtherFiles\jettest.mdb
oConn.open strConn
%>

On my local XP box, the first time I hit the hyperlink to call this page
(jet.asp), IIS shows me all the code on the page. If I refresh the page, it
renders and displays correctly, except the query that I run does not appear
to execute, or at the very least, the results of the query are not
returned/displayed.

When I run this page on the IIS server, I get the following error message:

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/GSDtest/Jet.asp, line 8

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and
Settings\rks.RPS.002\My Documents\My
Webs\richweb\GSDtest\OtherFiles\jettest.mdb
----------------------------^

The ^ character is pointing to the "." (period) after OLEDB and before the
number 4. Can anyone tell me why I am having this problem and how to resolve
it?

TIA,
Rich

Your error returned can be the result of a break in the connection
string. And since the error is on line 8 and your connection string
begins on 7, it makes me think that is the issue -- please confirm.

I deal with lots of different flavors on databases. As such, I cannot
remember (nor do I make the attempt to remember jargon as long as I
know where to look it up) all the different string for which I'm
responsible. I use this website often:

http://www.connectionstrings.com/


.



Relevant Pages

  • Re: Could a change of SQL ports break a data reader?
    ... Can you use SQL Profiler ... to catch the statement that gets executed, paste it into query ... > Dim connectionString As String ... > ' now we have a valid connection string ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Count of fields in Database
    ... Usually you can just query the appropriate system table that contains ... Dim cnnDatabase As New ADODB.Connection ... ' Use appropriate OLE or ODBC connection string for connecting to SyBase ...
    (microsoft.public.access.queries)
  • Re: Bitwise And
    ... I am familiar with use of "New" in a Dim. ... It is interesting that the query is invisible for you but not me. ... I am nearly certain that the Flags field consists of binary bit flags. ... > try using your own connection string, ...
    (microsoft.public.access.queries)
  • Re: Password encrypt
    ... Create the connection string in the global.asa file... ... My IIS server is outside firewall. ... > Connection information is stored in the parameter file in IIS server. ... > file inside each page of ASP code. ...
    (microsoft.public.sqlserver.security)
  • Re: Running sql-query
    ... >How do I run this query ... >Dim objConnectionUNI As OleDbConnection = New OleDbConnection ... dim cmd as sqlcommand ... cn = new sqlconnection("appropriate connection string") ...
    (microsoft.public.dotnet.languages.vb)