Drivers error '80004005'

Having this error message

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.

/testresponse.asp, line 35



what to do
thanks in advance
tparvaizAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mgfranzCommented:
This is a Windows NT permissions problem. The account that is accessing the page doesn't have sufficient permissions to lock the database. The account would be either the anonymous account (by default the IUSR_<machinename>) or a specific user account if the page has been secured for authenticated access.
If the page is meant to be accessed anonymously, give the IUSR_<machinename> account full control to the ASP page, and the folder and files where the database is located. Additionally, if the path to the database is being referenced using UNC (\\Server\Share), ensure that the Share Permissions allow the IUSR_<machinename> account full access. This step applies even if the share is on the local Web server.

If the page has been secured such that the IUSR_<machinename> can't access the file or database, then ensure that the user's account that is being authenticated has full control to the appropriate folders and files.

At a minimum, the account being used needs Create, Destroy, Read, Write to work with the .ldb file. Specific permission can be applied to the database to limit access.

0
tparvaizAuthor Commented:
Thanks for your suggestion:
My question is how to do :

"If the page is meant to be accessed anonymously, give the USR_<machinename> account full control to the ASP page"


I've created an asp page @ c->intetpub->wwwroot->manager.

I've stored my second asp file at the same path.

My second asp file is accessing database to add recodrd, but having error message.

I've followed the same procedure before and it worked but not this time.

thanks


0
mgfranzCommented:
What directory is the dB located in?  

Does your asp page access the dB with an account request?  
Is the dB permissions locked to the IUSER_ACCOUNT?
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

tparvaizAuthor Commented:
My database is @

c:\WINNT\Profiles\Administrator.000\Personal\


please explain what do you meant by:

"Is the dB permissions locked to the IUSER_ACCOUNT?"


thanks for your precious time


0
TTomCommented:
The IUSR_machinename account must have access to the directory "C:\winnt\profiles\administrator.000\personal".

That is pretty unlikely, so you probably need to change the NT permissions or move the file.

Tom
0
tparvaizAuthor Commented:
what is IUSR_machinename and how can I give access to directoryC:\winnt\profiles\administrator.000\personal

and where should I move the file?


thanks
0
tparvaizAuthor Commented:
I am using following code: and getting above error.

<%@ Language=VBScript %>
<% Option Explicit %>
<!--#INCLUDE VIRTUAL="adovbs.inc" -->
<HTML>
<HEAD>
<%
Dim MyConn, RS, RS2, strFirstName, strLastName, strUserName, strPassword
Dim first, last, company, street, city, country
Dim province, zip, phone, email, item_qty, item_name, item_description


first=request.form("field_firstname")
last=request.form("field_lastname")
company=request.form("field_company")
street=request.form("field_billing_street")
city=request.form("field_billing_city")
country=request.form("field_billing_country")
province=request.form("field_provence")
zip=request.form("field_billing_zip")
phone=request.form("field_phone")
email=request.form("field_customer_email")
item_qty=request.form("field_item_qty")
item_name=request.form("text_area_item")
item_description=request.form("text_area_description")
'grab the form contents


Set MyConn=Server.CreateObject("ADODB.Connection")
Set RS=Server.CreateObject("ADODB.RecordSet")
'since you are working with the RecordSet you need to create an instance of the RecordSet Object

Set RS2=Server.CreateObject("ADODB.RecordSet")
'in this case, since we're adding to two separate tables we need to create two instances of the RecordSet Object

MyConn.Open "chdata"
'getdata is your DSN (data source name) you created in ODBC

RS.Open "Select * From tblcompanyaddress", MyConn, adOpenDynamic, adLockPessimistic, adCMDText
RS2.Open "Select * From tblcompanyinfo", MyConn, adOpenDynamic, adLockPessimistic, adCMDText
'open both RecordSets

RS.AddNew
RS("company")= company
RS("street")= street
RS("city")= city
RS("country")= country
RS("province")= province
RS("zip")= zip  
RS.Update
'Update the first RecordSet


RS2.AddNew
RS2("company")= company
RS2("contact_first_name")= first
RS2("contact_last_name")= last
RS2("contact_ph_no")= phone
RS2("contact_email")= email
RS2.Update
'Update the second RecordSet

RS.Close
RS2.Close
MyConn.Close
%>


</HEAD>
<BODY>

<P>&nbsp;</P>

</BODY>
</HTML>


0
tparvaizAuthor Commented:
ASP files are at

tparvaiz.webhostme.com/bestuserinterface.asp
0
tparvaizAuthor Commented:
When I've put it over web, getting this error messages

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/testresponse.asp, line 35


Defenately there is some error in Coding
thanks
0
tparvaizAuthor Commented:
from the web-hosting company I was send this procedure to follow:



/*****************//////////////
How to create an DSN-LESS connection using ADO


Description:
This document is provided to help you connect to your Access databases using native Microsoft Jet OLEDB provider and without an DSN.  All the information provided should be considered "as is".  No further programming support will be provided by WebHostMe other than the listing of the code here.


Sample Code for DSN-Less database connection

Begin Conn Open <BR>
<%
Set AdoConn = Server.CreateObject ("ADODB.Connection")
AdoConn.Provider = "Microsoft.Jet.OLEDB.4.0"
AdoConn.ConnectionString = "Data Source=" & Server.MapPath ("/cgi-bin/mydatabase.mdb") 'Put the DB in cgi-bin for write access
AdoConn.Open
Set AdoConn = nothing
%>
Connection Open Complete<BR>



///////////*************

please edit my code according to the requirement
0
mgfranzCommented:
Do you have a DSN connection created?  If not, you either need to create one in the ODBC manager, or use a DSN less connection;

Change your MyConn.Open line to this;

MyConn.Open "DBQ=" & Server.MapPath("chdata.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"

This assumes the database name is chdata.mdb.

Mark


0
tparvaizAuthor Commented:
Getting this error
///////starting error message////////
Microsoft VBScript compilation error '800a0401'

Expected end of statement

/testresponse.asp, line 35

MyConn.Open "DBQ=" &amp; Server.MapPath("chdata.mdb") &amp; ";Driver={Microsoft



///////////End///////////////////

and a dashed line is pointing toward ';' of '&amp;'



I've changed my code to

<%@ Language=VBScript %>
<% Option Explicit %>
<!--#INCLUDE VIRTUAL="adovbs.inc" -->
<HTML>
<HEAD>
<%
Dim MyConn, RS, RS2, strFirstName, strLastName, strUserName, strPassword
Dim first, last, company, street, city, country
Dim province, zip, phone, email, item_qty, item_name, item_description


first=request.form("field_firstname")
last=request.form("field_lastname")
company=request.form("field_company")
street=request.form("field_billing_street")
city=request.form("field_billing_city")
country=request.form("field_billing_country")
province=request.form("field_provence")
zip=request.form("field_billing_zip")
phone=request.form("field_phone")
email=request.form("field_customer_email")
item_qty=request.form("field_item_qty")
item_name=request.form("text_area_item")
item_description=request.form("text_area_description")
'grab the form contents


Set MyConn=Server.CreateObject("ADODB.Connection")
Set RS=Server.CreateObject("ADODB.RecordSet")
'since you are working with the RecordSet you need to create an instance of the RecordSet Object

Set RS2=Server.CreateObject("ADODB.RecordSet")
'in this case, since we're adding to two separate tables we need to create two instances of the RecordSet Object

MyConn.Open "DBQ=" &amp; Server.MapPath("chdata.mdb") &amp; ";Driver={Microsoft
Access Driver (*.mdb)};"
'getdata is your DSN (data source name) you created in ODBC

RS.Open "Select * From tblcompanyaddress", MyConn, adOpenDynamic, adLockPessimistic, adCMDText
RS2.Open "Select * From tblcompanyinfo", MyConn, adOpenDynamic, adLockPessimistic, adCMDText
'open both RecordSets

RS.AddNew
RS("company")= company
RS("street")= street
RS("city")= city
RS("country")= country
RS("province")= province
RS("zip")= zip  
RS.Update
'Update the first RecordSet


RS2.AddNew
RS2("company")= company
RS2("contact_first_name")= first
RS2("contact_last_name")= last
RS2("contact_ph_no")= phone
RS2("contact_email")= email
RS2.Update
'Update the second RecordSet

RS.Close
RS2.Close
MyConn.Close
%>


</HEAD>
<BODY>

<P>&nbsp;</P>

</BODY>
</HTML>



0
mgfranzCommented:
You can't have your string in VB with ascii characters.  take out the &amp; and replace it with just &

Mark
0
tparvaizAuthor Commented:
getting this error-message

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/testresponse.asp, line 35
0
mgfranzCommented:
This tells me that the dB is not in the path specified.  Move the dB file to the same directory as the .asp files.

Mark
0
tparvaizAuthor Commented:
I've tried it that too. There must be something else missing from my code

thanks for your time
0
mgfranzCommented:
0
tparvaizAuthor Commented:
I've tried it that too. There must be something else missing from my code

thanks for your time
0
manojaminCommented:
Read this, It will help you...

Error Message: Microsoft OLE DB Provider for ODBC Drivers Error '80004005'
http://support.microsoft.com/support/kb/articles/Q238/9/71.ASP
0
tparvaizAuthor Commented:
Hi,
I went to the following URL :
http://support.microsoft.com/support/kb/articles/Q238/9/71.ASP

During editing registry, I am unable to follow this step:

3. On the Security menu, select Permissions.

Please help me

Thanks for your time
0
manojaminCommented:
That mean you do not have the permission to read that security descriptors...

Are you logeed in as Admin?
Do you have full control over the registry?

You are using regedt32, aren't you?

0
tparvaizAuthor Commented:
I do have admin permissions.
I have full control over the registry.

I am just typing regedit.exe at start-run.

Let me know what should I do next
Thanks
0
mgfranzCommented:
type in regedt32.exe

But you really shouldn't have to modify these permissions.  It won't hurt to try though.

Mark
0
tparvaizAuthor Commented:
same error.
0
mgfranzCommented:
What is in your adovbs.inc file?  

This line is on one line isn't it? No <CR> at all.

MyConn.Open "DBQ=" & Server.MapPath("chdata.mdb") & ";Driver={Microsoft
Access Driver (*.mdb)};"
0
TTomCommented:
But you are talking about making this work on an ISP's box, not on your development box, no?

If that's the case, the code the ISP gave you is exactly what you need to do.

<%
Set AdoConn = Server.CreateObject ("ADODB.Connection")

AdoConn.Provider = "Microsoft.Jet.OLEDB.4.0"

AdoConn.ConnectionString = "Data Source=" & Server.MapPath ("/cgi-bin/mydatabase.mdb") 'Put the DB in cgi-bin for write access

AdoConn.Open
%>

Where the CR's represent the code which must be on the same line.  That will open a connection to the database on the ISP's server in your cgi-bin directory.

Tom
0
tparvaizAuthor Commented:
Tom
How am I going to convert this part of my code, as described by ISP


Set MyConn=Server.CreateObject("ADODB.Connection")
Set RS=Server.CreateObject("ADODB.RecordSet")
'since you are working with the RecordSet you need to create an instance of the RecordSet Object

Set RS2=Server.CreateObject("ADODB.RecordSet")
'in this case, since we're adding to two separate tables we need to create two instances of the RecordSet Object

MyConn.Open "DBQ="&Server.MapPath("chdata.mdb")&"Driver={Microsoft Access Driver (*.mdb)};"
'getdata is your DSN (data source name) you created in ODBC

RS.Open "Select * From tblcompanyaddress", MyConn, adOpenDynamic, adLockPessimistic, adCMDText
RS2.Open "Select * From tblcompanyinfo", MyConn, adOpenDynamic, adLockPessimistic, adCMDText
'open both RecordSets

RS.AddNew
RS("company")= company
RS("street")= street
RS("city")= city
RS("country")= country
RS("province")= province
RS("zip")= zip  
RS.Update
'Update the first RecordSet


RS2.AddNew
RS2("company")= company
RS2("contact_first_name")= first
RS2("contact_last_name")= last
RS2("contact_ph_no")= phone
RS2("contact_email")= email
RS2.Update
'Update the second RecordSet

RS.Close
RS2.Close
MyConn.Close







thanks
0
mgfranzCommented:
Do you still get the error with this code?

Try this hack;

RS.Open "Select * From tblcompanyaddress", MyConn, 3, 3

RS2.Open "Select * From tblcompanyinfo", MyConn, 3, 3


Instead of using this;

RS.Open "Select * From tblcompanyaddress", MyConn, adOpenDynamic, adLockPessimistic, adCMDText
RS2.Open "Select * From tblcompanyinfo", MyConn, adOpenDynamic, adLockPessimistic, adCMDText

Mark
0
tparvaizAuthor Commented:
Noops,
Still not working
0
mgfranzCommented:
What is it that is not working, are you not connecting to the dB?  Is the data not updating?

Are you passing the data in from a form page?
0
TTomCommented:
To convert according to THEIR suggestion:

Set MyConn = Server.CreateObject ("ADODB.Connection")

MyConn.Provider = "Microsoft.Jet.OLEDB.4.0"

MyConn.ConnectionString = "Data Source=" & Server.MapPath ("/cgi-bin/chdata.mdb")

MyConn.Open

That should get things working PROVIDED that your database, chdata.mdb, is located in a /cgi-bin directory under your root directory.  You need to be careful about where the database is located because there will be files WRITTEN to the directory in order to use ACCESS.  That's why your ISP commented as above.

Tom

0
tparvaizAuthor Commented:
Here are my two ASP files: from one asp file I am doing data validation and passing on to another ASP page for data storage


//////////////formValidation.asp//////////
<%@ Language=VBScript %>
<HTML>
<HEAD>
<SCRIPT LANGUAGE="VBScript">

sub button1_onclick()

  Select Case True
  Case FORM1.field_firstname.value = "" 
    msgbox "Please Enter First Name"
    ret = false
    call FORM1.field_firstname.focus()
  Case FORM1.field_lastname.value = "" 
    msgbox "Please Enter Last Name"
    ret = false
    call FORM1.field_lastname.focus()
  Case FORM1.field_company.value = "" 
    msgbox "Please Enter Company Name"
    ret = false
    call FORM1.field_company.focus()
  Case FORM1.field_billing_street.value = "" 
    msgbox "Please Enter Street No"
    ret = false
    call FORM1.field_billing_street.focus()
  Case FORM1.field_billing_city.value = "" 
    msgbox "Please Enter City"
    ret = false
    call FORM1.field_billing_city.focus()
  Case FORM1.field_billing_country.value = "" 
    msgbox "Please Enter Country"
    ret = false
    call FORM1.field_billing_country.focus()
  Case FORM1.field_provence.value = "" 
    msgbox "Please Enter Provence"
    ret = false
    call FORM1.field_provence.focus()
  Case FORM1.field_billing_zip.value = "" 
    msgbox "Please Enter Zip Code"
    ret = false
    call FORM1.field_billing_zip.focus()
  Case FORM1.field_phone.value = "" 
    msgbox "Please Enter Ph #"
    ret = false
    call FORM1.field_phone.focus()
  Case FORM1.field_customer_email.value = "" 
    msgbox "Please Enter Valid Email"
    ret = false
    call FORM1.field_customer_email.focus()
  Case FORM1.field_item_qty.value = "" 
    msgbox "Please Enter item quantity"
    ret = false
    call FORM1.field_item_qty.focus()
  Case FORM1.text_area_item.value = "" 
    msgbox "Please Enter Item Name"
    ret = false
      call FORM1.text_area_item.focus()
  Case FORM1.text_area_description.value = "" 
    msgbox "Please Enter description of item"
    ret = false
    call FORM1.text_area_description.focus()
  Case else
    call FORM1.submit()
 End Select

End sub

</SCRIPT>
</HEAD>
<BODY>
<CENTER>
<P style="FONT-SIZE: x-large">Order Form</P>
<P style="FONT-SIZE: medium">Please provide the following information, then
click Submit:</P>
<P>
<FORM action=testresponse.asp id=FORM1 method=post name=FORM1>
<TABLE align=center bgColor=linen border=1 cellPadding=1 cellSpacing=1
width="75%">
 
  <TR>
    <TD>
      <P>Title</P>
      <P>First Name </P></TD>
    <TD>
      <P>
      <TABLE border=1 cellPadding=1 cellSpacing=1 width="75%">
       
        <TR>
          <TD><INPUT id=radio1 name=radio1 type=radio></TD>
          <TD>Mr.</TD>
          <TD><INPUT id=radio2 name=radio2 type=radio></TD>
          <TD>Ms.</TD></TR></TABLE></P><INPUT id=text1 name=field_firstname></TD></TR>
  <TR>
    <TD>Last Name </TD>
    <TD><INPUT id=text2 name=field_lastname></TD></TR>
  <TR>
    <TD>Company </TD>
    <TD><INPUT id=text3 name=field_company></TD></TR>
  <TR>
    <TD>Street Address </TD>
    <TD><INPUT id=text4 name=field_billing_street></TD></TR>
  <TR>
    <TD>City / Town </TD>
    <TD><INPUT id=text5 name=field_billing_city></TD></TR>
  <TR>
    <TD>Country </TD>
    <TD><INPUT id=text6 name=field_billing_country></TD></TR>
  <TR>
    <TD>State / provence </TD>
    <TD><INPUT id=text7 name=field_provence></TD></TR>
  <TR>
    <TD>Zip / Postal Code </TD>
    <TD><INPUT id=text8 name=field_billing_zip></TD></TR>
  <TR>
    <TD>Phone </TD>
    <TD><INPUT id=text9 name=field_phone></TD></TR>
  <TR>
    <TD>Email </TD>
    <TD><INPUT id=text10 name=field_customer_email></TD></TR></TABLE></P>
<CENTER><LABEL
style="FONT-FAMILY: cursive; FONT-SIZE: large; FONT-STYLE: oblique; FONT-VARIANT: small-caps; FONT-WEIGHT: bold; LIST-STYLE: none inside">
<HR style="BACKGROUND-ATTACHMENT: fixed; BORDER-BOTTOM-COLOR: darkblue">
&nbsp;</LABEL></CENTER>
<CENTER><LABEL
style="FONT-FAMILY: cursive; FONT-SIZE: large; FONT-STYLE: oblique; FONT-VARIANT: small-caps; FONT-WEIGHT: bold; LIST-STYLE: none inside">Item
Information</LABEL></CENTER>
<P></P>
<P>
<TABLE align=center bgColor=skyblue border=1 cellPadding=1 cellSpacing=1
width="75%">
 
  <TR>
    <TD>Quantity</TD>
    <TD><INPUT id=text11 name=field_item_qty style="HEIGHT: 22px; WIDTH: 180px"></TD></TR>
  <TR>
    <TD>Item</TD>
    <TD><TEXTAREA id=TEXTAREA1 name=text_area_item style="HEIGHT: 57px; WIDTH: 248px"></TEXTAREA></TD></TR>
  <TR>
    <TD>Description</TD>
    <TD><TEXTAREA id=TEXTAREA2 name=text_area_description style="HEIGHT: 60px; WIDTH: 247px"></TEXTAREA></TD></TR></TABLE></P>
<HR style="BACKGROUND-ATTACHMENT: fixed; BORDER-BOTTOM-COLOR: darkblue">
<P>&nbsp;
<TABLE align=center bgColor=white border=0 cellPadding=0 cellSpacing=0
style="WIDTH: 35%" width="35%">
 
  <TR>
    <TD><INPUT id=button1 name=button1 style="FONT-SIZE: larger" type=button value=Submit></TD>
    <TD><INPUT id=reset1 name=reset1 style="FONT-SIZE: larger" type=reset value=Reset></TD></TR></TABLE></P></CENTER></FORM>
</BODY>
</HTML>





//////////////////testrespnse.asp//////////

<%@ Language=VBScript %>
<% Option Explicit %>
<!--#INCLUDE VIRTUAL="adovbs.inc" -->
<HTML>
<HEAD>
<%
Dim MyConn, RS, RS2, strFirstName, strLastName, strUserName, strPassword
Dim first, last, company, street, city, country
Dim province, zip, phone, email, item_qty, item_name, item_description


first=request.form("field_firstname")
last=request.form("field_lastname")
company=request.form("field_company")
street=request.form("field_billing_street")
city=request.form("field_billing_city")
country=request.form("field_billing_country")
province=request.form("field_provence")
zip=request.form("field_billing_zip")
phone=request.form("field_phone")
email=request.form("field_customer_email")
item_qty=request.form("field_item_qty")
item_name=request.form("text_area_item")
item_description=request.form("text_area_description")
'grab the form contents


Set MyConn=Server.CreateObject("ADODB.Connection")
Set RS=Server.CreateObject("ADODB.RecordSet")
'since you are working with the RecordSet you need to create an instance of the RecordSet Object

Set RS2=Server.CreateObject("ADODB.RecordSet")
'in this case, since we're adding to two separate tables we need to create two instances of the RecordSet Object

MyConn.Open "DBQ="&Server.MapPath("chdata.mdb")&"Driver={Microsoft Access Driver (*.mdb)};"
'getdata is your DSN (data source name) you created in ODBC

RS.Open "Select * From tblcompanyaddress", MyConn, 3, 3
RS2.Open "Select * From tblcompanyinfo", MyConn, 3, 3
'open both RecordSets

RS.AddNew
RS("company")= company
RS("street")= street
RS("city")= city
RS("country")= country
RS("province")= province
RS("zip")= zip  
RS.Update
'Update the first RecordSet


RS2.AddNew
RS2("company")= company
RS2("contact_first_name")= first
RS2("contact_last_name")= last
RS2("contact_ph_no")= phone
RS2("contact_email")= email
RS2.Update
'Update the second RecordSet

RS.Close
RS2.Close
MyConn.Close
%>


</HEAD>
<BODY>

<P>&nbsp;</P>

</BODY>
</HTML>




/////////Getting this error message//////////

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/testresponse.asp, line 35



thanks for your time
0
mgfranzCommented:
there is a semi-colin missing..

Here is the correct string;

MyConn.Open "DBQ=" & Server.MapPath("chdata.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"

Mark

P.S. This assumes the dB is in the same directory as the .asp file.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tparvaizAuthor Commented:
hello mqfranz,
read you above comments:
'You can't have your string in VB with ascii characters.  take out the &amp; and replace it with just & '


Having same error

Mark
0
mgfranzCommented:
I just ran the supplied scripts with the fixes in place and it works fine on my sample dB.

Let me know if you have any other problems.

Mark
0
tparvaizAuthor Commented:
hello mqfranz,
read you above comments:
'You can't have your string in VB with ascii characters.  take out the &amp; and replace it with just & '


Having same error

Mark
0
tparvaizAuthor Commented:
Hi Mark,
Having same problem, may be its my server.

I am going to accept your answer but allow me to take some more time.


thanks for your time
0
manojaminCommented:
Read THESE DOCS

1)MDACCON.EXE Using Connection Strings w/ ODBC/OLEDB/ADO/RDS
http://support.microsoft.com/support/kb/articles/Q193/3/32.ASP

2) HOWTO: Open ADO Connection and Recordset Objects
http://support.microsoft.com/support/kb/articles/Q168/3/36.asp

0
TTomCommented:
Mark:

Does Server.MapPath provide the necessary "/" at the end of the string?

According to the code supplied by the ISP, it doesn't look like it.
================================
AdoConn.ConnectionString = "Data Source=" & Server.MapPath ("/cgi-bin/mydatabase.mdb")
================================

I'm still thinking the problem has to do with database location, either with the string or with the location of the file.

Tom
0
mgfranzCommented:
Sorry, replace the ascii character %amp; with & 

This is the EXACT string;

MyConn.Open "DBQ=" & Server.MapPath("chdata.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"

Copy it exactly.  If your editor is trying to replace the & with a &amp; Get a new editor for VB Scripting.

The ; HAS to be in place.  Would you like me to give you the URL of your working example?

Mark
0
tparvaizAuthor Commented:
mqfranz
Buy replacing your string, I am now having this error:

ADODB.Fields error '800a0cc1'

ADO could not find the object in the collection corresponding to the name or ordinal reference requested by the application.

/testresponse.asp, line 46
0
mgfranzCommented:
Ttom,  You may be correct with the MapPath issue.  My test dB is located in the same directory as the .asp pages on my dev server.  With the ISP suggested path to the cgi-bin, (strange place for a db..) the Server.MapPath would be like you stated;

MyConn.Open "DBQ=" & Server.MapPath("/cgi-bin/chdata.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"

This is also assuming the .asp file is located in the root dir and the cgi-bin is under root.  Where the rules on proper UNC are dictated.

E:\inetpub\wwwroot\tparviaz

Is the root web directory.  All .asp files are located here.

E:\inetpub\wwwroot\tparviaz\cgi-bin

Is where the dB is located.

Still, the fix is with the missing ;

Mark


0
mgfranzCommented:
Data base fields are case sensitive, ensure your fields are in lower case, or modify your script to match the exact field name.

Mark
0
tparvaizAuthor Commented:
My both asp, dbt files are at:

C:\inetpub\wwwroot\



Here I would like to mension that I am testing these files at my local machine but would transfer to website: hence my developing network is intranet but application has to be put on internet.

Ttom is right: my ISP suggests me to follow some specific path:

you can read ISPs specification at www.webhostme.com. It's free for ASP
0
mgfranzCommented:
One other thing, you should do some error checking on the form fields to ensure the user is not passing bad data.  i.e. type "abcde" into your 'Zip field and see what response the script gives you.

Mark

(jeez this is a lot for 115 points...)
0
tparvaizAuthor Commented:
Adjusted points to 130
0
manojaminCommented:
WOW!!! 15 more points!!
0
tparvaizAuthor Commented:
Adjusted points to 150
0
TTomCommented:
I think the ISP is suggesting that directory because it is enabled for "write", probably for purposes of form processing.  I would not do it that way, but, then again, I don't run an ISP.

Access will need to be in a directory where the web server account (IUSR_machinename) can write files (in order to create the lock file).

I sincerely doubt that the root directory will be enabled for "write" privileges.

The key to this whole thing is having a similar setup on the development machine as the production machine, or, at least, understanding the difference between the two configurations and how to deal with them.  That's why DSN's are frequently used.  As long as the DSN name is the same on both machines, you're pretty much safe that they will work.

Mark:  Nobody ever said we were in this for the money, did they <G>?

Tom
0
mgfranzCommented:
OK, so we are at least at this point;

ADODB.Fields error '800a0cc1'

ADO could not find the object in the collection corresponding to the name or ordinal reference requested by the application.

So the script is connecting to the dB, and the dB is trying to pass data but the fields are not matching the script query.  Keep the dB and the scripts in the same place for now.

This should be working fine as long as the fields in the dB match the query from the script.


Tom,  I don't know buddy... I'm just glad it's Friday. ;-)
0
tparvaizAuthor Commented:
Hi Everyone.
Application is working fine, problem was of type mismatch b/w query field and database_table field.

One more thing.

Please let me know that how am I going to do put my file at my web server. I am again going to put details from ISP.


Description:
This document is provided to help you connect to your Access databases using native Microsoft Jet OLEDB provider and without an DSN.  All the information provided should be considered "as is".  No further programming support will be provided by WebHostMe other than the listing of the code here.


Sample Code for DSN-Less database connection

Begin Conn Open <BR>
<%
Set AdoConn = Server.CreateObject ("ADODB.Connection")
AdoConn.Provider = "Microsoft.Jet.OLEDB.4.0"
AdoConn.ConnectionString = "Data Source=" & Server.MapPath ("/cgi-bin/mydatabase.mdb") 'Put the DB in cgi-bin for write access
AdoConn.Open
Set AdoConn = nothing
%>
Connection Open Complete<BR>



///////////*************

0
TTomCommented:
Me, too!

Tom (:-}
0
mgfranzCommented:
Place the .asp files, and the dB file in your home directory.  Thats all there is to it.

You can put the dB in any directory under your root dir as long as you have read/write permissions to it.

Mark
0
TTomCommented:
It sounds like your ISP wants you to put the db into a cgi-bin directory under the root.  Check with them.  They should be able to tell you where it goes on THEIR server.

Tom
0
tparvaizAuthor Commented:
At my home development environment, I've found that my file @ C:/inetpub/wwwroot/.asp is submiting form to my another file @ C:/inetpub/wwwroot/manager/.asp
and updating database @ C:/inetpub/wwwroot/.asp

Suggestions please
0
mgfranzCommented:
Look at your paths in your form tags;

<FORM action=testresponse.asp id=FORM1 method=post name=FORM1>

This is assuming that the submitting form.asp page is in the same directory as testresponse.asp.

Mark
0
tparvaizAuthor Commented:
OOPS,

I've found another thhing that my URL of my local server is C:/inetpub/wwwroot/manager/

i.e machine-name typed at browser leads to the above directory.

thanks
0
mgfranzCommented:
You need to set the default directory in the WWW manager on your local server to reflect that of the ISP.

Actually, this shouldn't matter as long as all the files are located under this /manager directory.

You need to look at how your UNC is being read.  You are familiar on how ../ and ./ and / are interpreted aren't you?

If you have another question regarding another problem, please post a new question.  this one is starting to take up a lot of time and effort by a few people.  If your original answer has been corectly answered, please accept an answer.

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.