CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Need help with Publishing an ASP 3.0 site

Print topic Send  topic

Author Message
Shnokey
Posted: 09/06/2003, 5:06 AM

Hello all - there are two parts to my problem, I hope I can find an answer - I am at my wit's end with this - and sometimes you miss the forest through the trees.

First - When I publish my site locally (I highly modified the "shopping cart" sample provided with CCS) I get the message:

Unable to establish connection to database.
Error information:
Microsoft JET Database Engine (0x80004005)
Could not find file 'C:\WINDOWS\system32\Internet.mdb'.
Other possible cause of this problem:
The database cannot be opened, most likely due to incorrect connection settings or insufficient security set on your database folder or file.
For more details please refer to http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306518

No matter what I do to the Project settings wizard - I can not change this - I know I'm missing something - but? I can go into the "Common.ASP" file and hand code the path to the database ( I would like it in the folder with the ASP files) - then it works - but the next time I publish locally - I need to modify the code - and that's no good.

Second - when I get this local version up and running - I FTP it to my hosting company - I can not write to the database - I can see the pages - see the products that are in the database, but when I try to add something to my shopping cart I get:

Source: Record add_to_cart / Insert Operation
Command Text: INSERT INTO store_shopping_cart_items(quantity, product_id, shopping_cart_id) VALUES (1, 29, '5')
Error description: Operation must use an updateable query. (Microsoft JET Database Engine)
INSERT INTO store_shopping_cart_items(quantity, product_id, shopping_cart_id) VALUES (1, 29, '5')

and the "admin" link tries to bring me back to localhost to log into the local version of the Access database (which does not work because of the bad path).

Sorry so winded - but the more you have to work with, the better we can learn from this forum -

All help appreciated -

Cheers
Morrell Aberdeen
Posted: 09/06/2003, 6:24 AM

Concerning your problems with the database connection, it may help if,
rather than hard coding the path to the database you use the MapPath method.
This allows the server to establish the physical path to the database.

See the two examples below. When you hard code the path in CodeCharge,
it may look something like this:

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\wwwroot\ud\asp\mydatabase.mdb"

In the above example, your database is an access database named mydatabase and on your local machine
it is in a folder named asp which is in a folder named ud, which in turn is in your wwwroot folder
on your harddrive (c).

Go to your common.asp file and modify it as follows to use the MapPath method:

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/ud/asp/mydatabase.mdb")


With respect to what happens when you ftp your site to your hosting company, I may need some more info. However,
is it hat the site is showing perfectly but it's just that you are
unable to write to the database? if that's the case you may have to
determine whether you have write permissions set at the server.
Different hosts have different rules. For example, most would have a special
folder just for your database. That folder ensures that persons are not
easily able to download your database. With some host you have to undergo
an additional step in setting write permissions for your database.
it maybe, therefore, that you would have to read their documentations
with regards to setting up your files and database on their server.

Let me know if this helps or how I can further assist.

Shnokey
Posted: 09/07/2003, 4:27 AM

Well after hours of working on the site, I have learned:

1) For the database write permissions, Yes - the hosting company had to make a DSN for the database, they created "Write" permissions to the database folder now I can write to the database -

2) I can code in the path provided for the database "path" But when I add it to the settings area in CCS (so everytime I publish the site I don't have to change the code manually) it publishes pointing to 'C:\WINDOWS\system32\Internet.mdb' to look for the database - I still don't know why. No Matter what link address I put in the settings area - it still returns me to that?

The one other thing that I don't understand is if you go to the "live site" on the host server, "hover" over the "Admin" link (Same as in the Bookstore demo) the link address in the lower left of the browser gives the proper address (IE: http://www.mysite.com/Admin/Menu.asp) but when I click on it, it goes to my localhost site link (http://localhost/mysite/Admin/Menu.asp) - I have no idea why it links to my localhost from the public website. The ONLY way I can get to the Admin section of the site that is hosted is to manually type in the URL - even though the link points directly to the same link - am I missing a "global" setting that is trying to push links back to the localhost? I did publish the site locally (localhost) first - then FTP'd it to the hosting company.

Any light on this mystery would be most appreciated.

Cheers
DaveRexel
Posted: 09/08/2003, 12:22 PM

::
>> I did publish the site locally (localhost) first - then FTP'd it to the
hosting company.
----

Just wondered if you used CCS to publish to the remote site as uploading the site folder via other FTP methods will transfer code meant to be used locally. In other words please ensure you use CCS FTP and setup your project accordingly.

The reason for this is that CCS rewrites part of your application to match the settings in the publishing tab of the project-properties dialog.

Dave


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.