|
| |
|
|
MCD
Posts: 664 Joined: 3/19/2002 From: Al USA Status: offline
|
ASP.NET ? - 6/17/2008 11:31:58
I created a simple Access database and used Expression Web's ASP.NET controls on an .aspx. The code works fine on my local machine running Vista's Developmental Server. Can anyone tell me why this code is not working on a server running ASP.NET 2.0? <form id="form1" runat="server"> <asp:DataList runat="server" id="DataList1" DataSourceID="AccessDataSource1"> <ItemTemplate> FName: <asp:Label Text='<%# Eval("FName") %>' runat="server" id="FNameLabel" /><br /> LName: <asp:Label Text='<%# Eval("LName") %>' runat="server" id="LNameLabel" /><br /> Town: <asp:Label Text='<%# Eval("Town") %>' runat="server" id="TownLabel" /><br /> <br /> </ItemTemplate> </asp:DataList> <asp:AccessDataSource runat="server" ID="AccessDataSource1" DataFile="App_Data/test.mdb" SelectCommand="SELECT [FName], [LName], [Town] FROM [names]"> </asp:AccessDataSource> </form> </body>
_____________________________
Author of " How To Build A Website With Duct Tape"
|
|
|
|
swoosh
Posts: 1437 Joined: 5/18/2002 From: Beaver Falls, PA Status: offline
|
RE: ASP.NET ? - 6/17/2008 12:18:41
quote:
DataFile="App_Data/test.mdb" Is the above the correct location of the database on the server?
_____________________________
Swoooosh Just Do It!
|
|
|
|
MCD
Posts: 664 Joined: 3/19/2002 From: Al USA Status: offline
|
RE: ASP.NET ? - 6/17/2008 13:41:45
Yes it is. It's baffling to me.
_____________________________
Author of " How To Build A Website With Duct Tape"
|
|
|
|
swoosh
Posts: 1437 Joined: 5/18/2002 From: Beaver Falls, PA Status: offline
|
RE: ASP.NET ? - 6/17/2008 13:49:59
Where is that directory precisely from the root?
_____________________________
Swoooosh Just Do It!
|
|
|
|
MCD
Posts: 664 Joined: 3/19/2002 From: Al USA Status: offline
|
RE: ASP.NET ? - 6/17/2008 14:01:45
Swoosh, the entire path is: http://www.martinscomputerdesigns.com/App_Data/test.mdb This is just test info. There is nothing important in it. The database is just data for a test.
_____________________________
Author of " How To Build A Website With Duct Tape"
|
|
|
|
swoosh
Posts: 1437 Joined: 5/18/2002 From: Beaver Falls, PA Status: offline
|
RE: ASP.NET ? - 6/17/2008 14:14:32
And where is the aspx page located on the server?
_____________________________
Swoooosh Just Do It!
|
|
|
|
MCD
Posts: 664 Joined: 3/19/2002 From: Al USA Status: offline
|
RE: ASP.NET ? - 6/17/2008 14:55:27
The aspx page is in the root. http://www.martinscomputerdesigns.com/test1.aspx
_____________________________
Author of " How To Build A Website With Duct Tape"
|
|
|
|
swoosh
Posts: 1437 Joined: 5/18/2002 From: Beaver Falls, PA Status: offline
|
RE: ASP.NET ? - 6/17/2008 15:12:10
Try changing the code of the path to the following and see what happens: ~/App_Data/test.mdb don't forget to upload the new file path to the server and leave the quotes surrounding the path also
< Message edited by swoosh -- 6/17/2008 15:32:20 >
_____________________________
Swoooosh Just Do It!
|
|
|
|
MCD
Posts: 664 Joined: 3/19/2002 From: Al USA Status: offline
|
RE: ASP.NET ? - 6/17/2008 15:36:11
quote:
~/App_Data/test.mdb I changed DataFile="App_Data/test.mdb" to DataFile="~/App_Data/test.mdb" and I still got a runtime error. Could it be my host is mistaken about the ASP.NET 2.0? If it's working on my system, shouldn't it work on a ASP.NET 2.0 server?
_____________________________
Author of " How To Build A Website With Duct Tape"
|
|
|
|
swoosh
Posts: 1437 Joined: 5/18/2002 From: Beaver Falls, PA Status: offline
|
RE: ASP.NET ? - 6/17/2008 15:39:47
quote:
If it's working on my system, shouldn't it work on a ASP.NET 2.0 server? Yes it should.....that's how I test mine. If I preview in broswer from EW and it works, I upload and there is no problem when I check the actual page online. Yes, they can be mistaken, sometimes they have to reinstall them if things aren't configured properly. It has happen to me a few times and the host says hold on let me reinstall and viola! what didn't work once suddenly does.
_____________________________
Swoooosh Just Do It!
|
|
|
|
MCD
Posts: 664 Joined: 3/19/2002 From: Al USA Status: offline
|
RE: ASP.NET ? - 6/17/2008 16:09:17
I am going to move the site over to a better hosting company and try it. We may be beating our brains in for nothing. Everything I tested works on my local machine. Thanks for your help. I'll post the results when the site is moved and tested.
_____________________________
Author of " How To Build A Website With Duct Tape"
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|