JET works on web with NT server but not on development laptop 
Author Message
 JET works on web with NT server but not on development laptop

HELP! I'm trying to teach a class on VB.Net and everything has been fine up
until this last thing we're trying.  Laptop has XP, IIS, and Jet 4.0
installed. Jet works on VB Windows applications to access an Access
database. Also, SQL Server works on laptop for Web applications. However,
Jet does not work on ASP.NET Web applications.  See error message below.
There are no passwords on the Access database. One thing: I do not have a
user called "Admin" but I am an administrator. VB shows the file as
"custsys.mdb.Admin" (I don't know where the "admin" comes from)

I uploaded it to our server just so someone could look at it and tell me
what is wrong, and the person said that it works!  I didn't believe it so I
tried.   http://www.*-*-*.com/ ;There are only
TWO LINES OF CODE in the application: OleDbDataAdapter1.Fill(DataSet11) and
DataGrid1.DataBind() (as you can see in the error message below).

I've done the obvious, like go into IIS and set up the inetpub/wwwroot/test
folder as an application.

Any ideas?

The Microsoft Jet database engine cannot open the file
'C:\Inetpub\wwwroot\test\custsys.mdb'. It is already opened exclusively by
another user, or you need permission to view its data.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: The Microsoft Jet
database engine cannot open the file 'C:\Inetpub\wwwroot\test\custsys.mdb'.
It is already opened exclusively by another user, or you need permission to
view its data.

Source Error:

Line 150:
Line 151:    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Line 152:        OleDbDataAdapter1.Fill(DataSet11)
Line 153:        DataGrid1.DataBind()
Line 154:    End Sub



Tue, 19 Apr 2005 00:14:52 GMT  
 JET works on web with NT server but not on development laptop
Sorry--this computer was set up with a concealed name before.  I am
"somebody" and I didn't notice it was set that way until after I posted.
This is really me. Please note, my student who also has a Windows XP machine
has exactly the same problem. We both have all Windows Updates posted.
Finally, the instructions I have given students are as follows:

  1.. Create a new project and choose ASP.NET Application. Before clicking
OK, you should change the name of the project to something recognizable.
Here I will use "webproject" but you can make it anything meaningful. The
name will be italicized throughout this example and you can replace it with
the name you choose. After it loads, the form looks a little different.  You
will notice that objects and properties differ a little, too.
  2.. Set VB to save all of the solution in the Web folder. Click the
project name at the top of the solution window then choose the menu option
FILE - SAVE webproject AS. and navigate to c:\Inetpub\wwwroot\webproject\.
Then click OK. This will allow you to FTP the entire application to a
server.
  3.. To link to a database:
a)      Place an Access database file into the folder you used in step 2
above

b)      Connect to the database as before using the Jet Server (right click
on Data Connections-add connection-PROVIDER-use Microsoft Jet 4.0-then next
tab and browse to your database etc.)

c)      Toolbox - Data

d)      Drag oledbdataadapter to the form. NEXT. Pick your database. Use SQL
Query builder. Etc.

e)      Click on the form, Data - Generate Dataset

f)        Toolbox - Web Forms - Datagrid

g)      Make suitable size and set the datasource and datamember

h)      Double click the form for a page load event (or under a control) and
enter the following (using your own database name)

        OleDbDataAdapter1.Fill(DataSet11)

        DataGrid1.DataBind()

i)        RUN!

  6.. to run it on a server:
a)      Copy the app to the server under inetpub/wwwroot/webproject (make
sure you use the new folder with the same name as your old one)

b)      On the server, go to control panel, IIS.msc, open the server, find
that new folder, right click that folder, click PROPERTIES, click DIRECTORY
tab, click CREATE button.

c)      Navigate to the .aspx file and open it using the address
http://server/webproject/webpage.aspx  (open the web page as named in your
ASP.NET project).



Tue, 19 Apr 2005 00:32:55 GMT  
 JET works on web with NT server but not on development laptop
We found that the problem was because, strangely enough, the local
user-administrator (me) didn't have access to this Access file (the one I
created!).  It was created pre-XP, so it must have made an assumption of no
permission when it was carried along with my old data in upgrading through
95, 98, 2000, then XP.  Just give permission on the application folder as
well as the TEMP and TMP folders to IUSR and then give permission to the
main local user to access the Access database.  To provide these
permissions, you need to go to control
panel-system-advanced-environment-local security setting and make sure which
folders TEMP and TMP are pointing to in both User Variables and System
Variables. Then make sure you have "classic" access to permissions. Go to
control panel-administrative tools-local security policy--then cruise down
to Network Access: sharing and security model for local accounts. Double
click and move from the cursed GUEST ONLY to CLASSIC!

DG


Quote:
> Sorry--this computer was set up with a concealed name before.  I am
> "somebody" and I didn't notice it was set that way until after I posted.
> This is really me. Please note, my student who also has a Windows XP
machine
> has exactly the same problem. We both have all Windows Updates posted.
> Finally, the instructions I have given students are as follows:

>   1.. Create a new project and choose ASP.NET Application. Before clicking
> OK, you should change the name of the project to something recognizable.
> Here I will use "webproject" but you can make it anything meaningful. The
> name will be italicized throughout this example and you can replace it
with
> the name you choose. After it loads, the form looks a little different.
You
> will notice that objects and properties differ a little, too.
>   2.. Set VB to save all of the solution in the Web folder. Click the
> project name at the top of the solution window then choose the menu option
> FILE - SAVE webproject AS. and navigate to c:\Inetpub\wwwroot\webproject\.
> Then click OK. This will allow you to FTP the entire application to a
> server.
>   3.. To link to a database:
> a)      Place an Access database file into the folder you used in step 2
> above

> b)      Connect to the database as before using the Jet Server (right
click
> on Data Connections-add connection-PROVIDER-use Microsoft Jet 4.0-then
next
> tab and browse to your database etc.)

> c)      Toolbox - Data

> d)      Drag oledbdataadapter to the form. NEXT. Pick your database. Use
SQL
> Query builder. Etc.

> e)      Click on the form, Data - Generate Dataset

> f)        Toolbox - Web Forms - Datagrid

> g)      Make suitable size and set the datasource and datamember

> h)      Double click the form for a page load event (or under a control)
and
> enter the following (using your own database name)

>         OleDbDataAdapter1.Fill(DataSet11)

>         DataGrid1.DataBind()

> i)        RUN!

>   6.. to run it on a server:
> a)      Copy the app to the server under inetpub/wwwroot/webproject (make
> sure you use the new folder with the same name as your old one)

> b)      On the server, go to control panel, IIS.msc, open the server, find
> that new folder, right click that folder, click PROPERTIES, click
DIRECTORY
> tab, click CREATE button.

> c)      Navigate to the .aspx file and open it using the address
> http://server/webproject/webpage.aspx  (open the web page as named in your
> ASP.NET project).



Fri, 22 Apr 2005 04:07:40 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ASP works on Personal Web Server, but not on remote server

2. DHTML/SQL Server app works fine internally, not on web server

3. Which Web Servers work with NT Workstation ?

4. What Works in Development Does Not Work When Deployed

5. menus in vbd does not work when run from web server

6. crystal web server 8 on NT server KILLS DSN's

7. RegOpenKeyEx, Not Working on Win95 (but working on win98 and NT)

8. Web Development Help Needed - VBScript & SQL Server

9. Using VB for Web Server Side Development

10. w2k development -> NT 4 server

11. Need Web site - client server development

12. Database App Works in Development NOT Production

 

 
Powered by phpBB® Forum Software