Idiot
|
| Posted: 08/28/2002, 1:10 PM |
|
If he has some friend to advise on how to upload it to his server.
I have finished my site on my hard drive and it is running fine,but am having problems making it work on server.
I made the site on Front Page but I can duplicate it without Front Page extensions if necessary.
It is based on an Access database which is in the same folder as the project.
On publishing the site comes up but is always pointing to my original database on my hard drive. The login.asp page comes up and even the html pages of the Front page part of the site.
Does something special need to be on my server to make it work
I am somewhat confused about modify connection, my connection string on the hard drive version of the site I use Jet4
Questions
Modify Connection-Design Page
1)Do I use ODBc Data Source Name...if so what is it
2)Do I change Connection string to something else..if so what
3)User Name and Password..is this for the database or the server.
Modify Connection-Advanced
..dont have a clue what this is, do i do anything in here
Modify Connection-Server
Same questions as above.
got 2 days left on my trial and I gotta get this site up..so I can get my company to cough up the 200 odd dollars
|
|
|
 |
Joe
|
| Posted: 08/28/2002, 6:09 PM |
|
Im having real problems as well uploading my site, the tutorials are great for getting sites published locally but are real abstract when publishing for real
|
|
|
 |
Sanddy
|
| Posted: 08/28/2002, 11:00 PM |
|
You probably need to change the Path to the Database.
Actually, open the Project in CC and go to the Site -> Properties tab. Then select "Database". The Database panel is devided into 2 parts. In the first part I guess you have already added the path to your database file (that's the reason why ur sites working on localhost).
Now from the "Server" panel, change the "Connection String Type" dropdown to "Create Automatically (Ms Access Only)", this will automatically setup the database path for your server. Of course, also set the version of MS Access database you are using there in the "Ms Access version" dropdown.
Save and publish the project. While copying the project on the server, make sure you upload the database file into the same directory as your *asp files.
1) ODBC data source name is actually a database question, its another way of connecting to the database (like Jet 4.0 ), but amongst other things you do not need to know the path where the database file resides, but you need to setup the ODBC DSN first!
3) Username / Password on the Database tab is for the database.
|
|
|
 |
Idiot
|
| Posted: 08/29/2002, 7:12 AM |
|
Think your answer was for CC not CCstudio.
Im still confused what is this ODBC DSN is it a program or saomething that should reside on my server?
|
|
|
 |
No Name
|
| Posted: 08/29/2002, 12:14 PM |
|
To "Idiot"!
Sandy answered your question "..even an idiot can publish a CC site......" correctly.
Both, CC and CCS, have all explained in their documentation. Now the question is: "Can you read English text?"
|
|
|
 |
Idiot
|
| Posted: 08/29/2002, 12:25 PM |
|
Obviously only has far as building my site to work on my localhost. YOu have probably never been in a position where something that maybe relatively simple turns into hrs/days of wrong turns..So Please respond to somebody you might help.
For everyone else, I still dont have the database working I am getting this error meesage on the occasions login.asp comes up correctly(sometimes it does ...sometimes it doesnt)
Unable to establish connection to database.
Error information:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
More information:
The database cannot be opened, most likely due to insufficient security set on your database folder or file.
checking on FTP PRO all files seem to have uploaded correctly, though I had to manually upload the mdb file.
|
|
|
 |
DR
|
| Posted: 08/29/2002, 12:51 PM |
|
Re: 1)Do I use ODBc Data Source Name...if so what is it
No, you don't need this. Just "Build" your JET connection string in CCS Connection dialog, then modify it to be applicable to your hosted website.
Re: 2)Do I change Connection string to something else..if so what
Yes you do. Your hosting company should provide you with a special directory/folder where you should place your database. They also must provide you with the sample connection string. Most hosting companies describe this in their online docs.
3)User Name and Password..is this for the database or the server.
You don't need any of this.
Don
|
|
|
 |
Superkikim
|
| Posted: 08/29/2002, 4:33 PM |
|
hi there.
1st of all, check with your hosting provider where you should place your database. The best way is to create a database directory on root or within CGI-BIN, give "Everyone" write rights and as your provider to remove HTTP read permission (this will prevent your databases to be downloaded...)
Then, create a connection string with CCS, based on JET 4.0 (it's the easiest and I think the most efficient).
It will look like something like:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\wwwroot\cgi-bin\databases\yourdb.mdb;Persist Security Info=False
Then, the best way to avoid taking care of your server path (c:\.... e:... ???) is to user the server.mappath method.
Open common files in CCS, and go to common.asp.
Searh for the Connection string. And change it to the following:
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=" & server.mappath("\cgi-bin\databases\yourdb.mdb") & ";Persist Security Info=False"
Server.mappath will convert the given path to the server path once it is called.
You cant use this directly on the "Modify Connection" tab, because it is not able to manage these changes yet ! Hopefully it will be fixed in a next release.
I hope this would help.
Best regards
|
|
|
 |
NoName
|
| Posted: 08/29/2002, 9:00 PM |
|
Server.mappath will convert the given path to the server path once it is called.
=======================================
Server.mappath ... for this to work your database must be in the same folder or in any folder bellow your Common.asp file.
If your database is in another folder located at the same path level or before the folder in which common.asp resides than you must specify the full path name to the database: "S:/folder1/frolder2/..../xxx.mdb" instead of using the server.mappath method.
|
|
|
 |
Brian Bermingham
|
| Posted: 08/30/2002, 12:47 AM |
|
NoName
You suggested.
"Server.mappath ... for this to work your database must be in the same folder or in any folder bellow your Common.asp file."
This is not so, I have been using the following without any problems.
server.mappathServer.MapPath("../dbs/database.mdb")
Regards
|
|
|
 |
NoName
|
| Posted: 08/30/2002, 10:29 AM |
|
Brian,
now put your .asp files into ("../dbs/asp/*.asp").
My IIS server will not find the "../dbs/xxx.mdb" file
|
|
|
 |
Superkikim
|
| Posted: 08/30/2002, 4:02 PM |
|
Brian,
Server.MapPath is refering to your website root.
If you db is in http://www.yourdomain.com/tralala/db/forum and the realname is
C:\hosting\provider\private\yourdomain
Server.mappath("/www.yourdomain.com/tralala/db/forum/yourdb.mdb") will return
"C:\hosting\provider\private\yourdomain\tralala\db\forum\yourdb.mdb"
|
|
|
 |
Brian B
|
| Posted: 08/31/2002, 3:09 AM |
|
NoName
In that case Server.MapPath("../dbs/database.mdb") wouldn't work.
The Server.MapPath method translates a virtual directory or filename into a physical directory or filename. When you pass it the name of the current file, it will return the full physical drive:/pathname/filename for the file.
The Data Source in the connection string needs to be the full physical drive:/pathname/filename of the database.
If your file structure below the virtual directory is /dbs/asp/*.asp and the database is /dbs/xxx.mdb
Have you tried Server.MapPath("../../dbs/xxx.mdb")?
|
|
|
 |
Idiot
|
| Posted: 09/04/2002, 3:26 PM |
|
First part of my problem was the ISP
the connection string they gave me was useless in fact, it was only about an hr ago after finally hanging the phone up on them, after being told this is a coding question and not a support problem. that with the clues i got from you guys and ignoring a bunch of what they told me that I got it too work.
Spent the first few days totally on the wrong track, because they told me I had to create a databases folder, and even now it doesnt work if i try to keep the database in any diffferant folder than the rest of the files.
So. 1ST BIG LESSON FOR A NEWBIE was ENSURE YOU UPLOAD A SAMPLE FILE before spending a lot of time crating yer first site.
Even now the site is up...its as slow as molasses (even on the Login page)
So NOW I DEFINATELY GOT TO GET A NEW ISP.
Its sort of weird, but thats just about all Ive learnt from this escapade, other than 8 out 9 responders were very kewl to give me their time. thanx!!
ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath"(/intranet.mdb" ) & ";"
|
|
|
 |
Superkikim
|
| Posted: 09/05/2002, 4:25 AM |
|
Guys... Nothing complicated here. But maybe are you not all familiar with the use of directory caracters. The information below is universal. It doesn't concern only websites.
"/" or "\" at the begining of a path is refering to the root of the location
I.e.: If you are on your drive C: and you type at a command prompt (DOS window) "dir \", it will show you the content for the root directory
"." is refering to the current folder. If you are on the C:\windows directory and type at a command prompt (DOS window) "dir ." it will show you the content of the C:\windows directory.
".." is refering to the parent directory. If you are in the directory "C:\my documents\my music\madonna" and you type at command prompt "dir ..", it will show you the content of "C:\my documents\my music"
On the net, for your database:
If your website is on C:\inetpub\wwwroot, server.mappath will convert "yourfilepath" to "C:\inetpub\wwwroot\yourfilepath"
Some example considering your website beeing in C:\inetpub\wwwroot
server.mappath("/cgi-bin/db.mdb") = "C:\inetpub\wwwroot\cgi-bin\db.mdb"
server.mappath("../cgi-bin/db.mdb") = "C:\inetpub\cgi-bin\db.mdb"
server.mappath("db.mdb") = C:\inetpub\wwwroot\db.mdb"
server.mappath("../../cgi-bin/db.mdb") = "C:\db.mdb"
server.mappath("./cgi-bin/db.mdb") = C:\inetpub\wwwroot\db.mdb"
And so on...
|
|
|
 |
Brian B
|
| Posted: 09/05/2002, 5:42 AM |
|
Superkikim
I do agree the it is not very complicated. However...
Should you last 2 examples not be?
server.mappath("../../cgi-bin/db.mdb") = "C:\cgi-bin\db.mdb"
server.mappath("./cgi-bin/db.mdb") = C:\inetpub\wwwroot\db.mdb"
|
|
|
 |