Monday, March 26, 2012
Trouble installing ASP.Net app on 2003 enterprise server (404's)
After installing the application I get 404's when I try to access the
aspx pages on the server (not other pages like html or stylesheets).
I installed IIS after the .Net runtime and ran aspnet_regiis
afterwards. I checked, that the .aspx extension is mapped to the
aspnet_isapi.dll for all verbs. Still no luck.
An example W3C log entry is:
""2004-08-10 17:30:52 127.0.0.1 GET
/SolutionsLicensing/ProductSelect.aspx - 80 TESTLAB\Stefan 127.0.0.1
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322)
404 2 1260""
My environment is IIS 6.0 on Windows Server 2003 Enterpise Edition.
CLR version is 1.1.4322.
I don't quite know where to go from here. Can somebody help me out
here?
Thanks!
-StefanIs the root directory of your ASP.Net app marked as an application?
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Stefan" <kieseltest@.hotmail.com> wrote in message
news:7765139c.0408101101.28a573d5@.posting.google.com...
> I have a problem deploying a ASP.Net app on a 2003 Enterprise server.
> After installing the application I get 404's when I try to access the
> aspx pages on the server (not other pages like html or stylesheets).
> I installed IIS after the .Net runtime and ran aspnet_regiis
> afterwards. I checked, that the .aspx extension is mapped to the
> aspnet_isapi.dll for all verbs. Still no luck.
> An example W3C log entry is:
> ""2004-08-10 17:30:52 127.0.0.1 GET
> /SolutionsLicensing/ProductSelect.aspx - 80 TESTLAB\Stefan 127.0.0.1
> Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322)
> 404 2 1260""
> My environment is IIS 6.0 on Windows Server 2003 Enterpise Edition.
> CLR version is 1.1.4322.
> I don't quite know where to go from here. Can somebody help me out
> here?
> Thanks!
> -Stefan
Kevin,
I'm new to IIS6, so how do you mark the app as application? It's
configured to use the default application pool with execution
permissions on scripts only.
Thanks
-Stefan
"Kevin Spencer" <kspencer@.takempis.com> wrote in message news:<O2jc5KxfEHA.3544@.TK2MSFTNGP1
0.phx.gbl>...
> Is the root directory of your ASP.Net app marked as an application?
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
> "Stefan" <kieseltest@.hotmail.com> wrote in message
> news:7765139c.0408101101.28a573d5@.posting.google.com...
Trouble installing ASP.Net app on 2003 enterprise server (404s)
After installing the application I get 404's when I try to access the
aspx pages on the server (not other pages like html or stylesheets).
I installed IIS after the .Net runtime and ran aspnet_regiis
afterwards. I checked, that the .aspx extension is mapped to the
aspnet_isapi.dll for all verbs. Still no luck.
An example W3C log entry is:
""2004-08-10 17:30:52 127.0.0.1 GET
/SolutionsLicensing/ProductSelect.aspx - 80 TESTLAB\Stefan 127.0.0.1
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+.NET+CL R+1.1.4322)
404 2 1260""
My environment is IIS 6.0 on Windows Server 2003 Enterpise Edition.
CLR version is 1.1.4322.
I don't quite know where to go from here. Can somebody help me out
here?
Thanks!
-StefanIs the root directory of your ASP.Net app marked as an application?
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Stefan" <kieseltest@.hotmail.com> wrote in message
news:7765139c.0408101101.28a573d5@.posting.google.c om...
> I have a problem deploying a ASP.Net app on a 2003 Enterprise server.
> After installing the application I get 404's when I try to access the
> aspx pages on the server (not other pages like html or stylesheets).
> I installed IIS after the .Net runtime and ran aspnet_regiis
> afterwards. I checked, that the .aspx extension is mapped to the
> aspnet_isapi.dll for all verbs. Still no luck.
> An example W3C log entry is:
> ""2004-08-10 17:30:52 127.0.0.1 GET
> /SolutionsLicensing/ProductSelect.aspx - 80 TESTLAB\Stefan 127.0.0.1
> Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+.NET+CL R+1.1.4322)
> 404 2 1260""
> My environment is IIS 6.0 on Windows Server 2003 Enterpise Edition.
> CLR version is 1.1.4322.
> I don't quite know where to go from here. Can somebody help me out
> here?
> Thanks!
> -Stefan
Kevin,
I'm new to IIS6, so how do you mark the app as application? It's
configured to use the default application pool with execution
permissions on scripts only.
Thanks
-Stefan
"Kevin Spencer" <kspencer@.takempis.com> wrote in message news:<O2jc5KxfEHA.3544@.TK2MSFTNGP10.phx.gbl>...
> Is the root directory of your ASP.Net app marked as an application?
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
> "Stefan" <kieseltest@.hotmail.com> wrote in message
> news:7765139c.0408101101.28a573d5@.posting.google.c om...
> > I have a problem deploying a ASP.Net app on a 2003 Enterprise server.
> > After installing the application I get 404's when I try to access the
> > aspx pages on the server (not other pages like html or stylesheets).
> > I installed IIS after the .Net runtime and ran aspnet_regiis
> > afterwards. I checked, that the .aspx extension is mapped to the
> > aspnet_isapi.dll for all verbs. Still no luck.
> > An example W3C log entry is:
> > ""2004-08-10 17:30:52 127.0.0.1 GET
> > /SolutionsLicensing/ProductSelect.aspx - 80 TESTLAB\Stefan 127.0.0.1
> > Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+.NET+CL R+1.1.4322)
> > 404 2 1260""
> > My environment is IIS 6.0 on Windows Server 2003 Enterpise Edition.
> > CLR version is 1.1.4322.
> > I don't quite know where to go from here. Can somebody help me out
> > here?
> > Thanks!
> > -Stefan
Trouble on creating a new web project - UNC share does not exist or you do not have access
While I tried to create a new web project in VS.NET, I got the following
error message:
"Unable to create Web project 'Portal'. The UNC share
'E:\Project\Portal\Src\Web' does not exist or you do not have access."
My server's OS is Windows 2000 Server. My steps are:
In IIS:
1. create a virtual directory 'Portal'. Its local directory is
'E:\Project\Portal\Src\Web'.
In VS.NET:
2. in 'Add New Project' dialog box, select the followings and click 'OK'
button.
Project Types: Visual C# Projects
Templates: New Project In Existing Folder
Name: Portal
3. in 'Create a New Project in an Existing Folder' dialog box, input the
following and click 'OK' button.
Folder location: http://localhost/Portal
4. And then, VS.NET tell me the error message:
"Unable to create Web project 'Portal'. The UNC share
'E:\Project\Portal\Src\Web' does not exist or you do not have access."
Can you help me to resolve the problem? I have tried for many days.
Thank you very much,
SimonFrom your description, this seems to be the problem:
http://support.microsoft.com/defaul...kb;en-us;320265
Cheers
Ken
"Simon Chung-Jen Chuang" <cjchuang98@.seed.net.tw> wrote in message
news:%23$y8W$VaDHA.4020@.tk2msftngp13.phx.gbl...
: Hello,
:
: While I tried to create a new web project in VS.NET, I got the following
: error message:
: "Unable to create Web project 'Portal'. The UNC share
: 'E:\Project\Portal\Src\Web' does not exist or you do not have access."
:
: My server's OS is Windows 2000 Server. My steps are:
: In IIS:
: 1. create a virtual directory 'Portal'. Its local directory is
: 'E:\Project\Portal\Src\Web'.
:
: In VS.NET:
: 2. in 'Add New Project' dialog box, select the followings and click 'OK'
: button.
: Project Types: Visual C# Projects
: Templates: New Project In Existing Folder
: Name: Portal
:
: 3. in 'Create a New Project in an Existing Folder' dialog box, input the
: following and click 'OK' button.
: Folder location: http://localhost/Portal
:
: 4. And then, VS.NET tell me the error message:
: "Unable to create Web project 'Portal'. The UNC share
: 'E:\Project\Portal\Src\Web' does not exist or you do not have access."
:
: Can you help me to resolve the problem? I have tried for many days.
Saturday, March 24, 2012
Trouble updating
Sub LoadInventory()
Connect()
Dim strQuery As String = "SELECT Type, Number FROM Inventory WHERE type = 'squares'"
Dim dbComm As New OLEDBCommand(strQuery, objConnection)
Dim reader As OLEDBDataReader = dbComm.ExecuteReader()
reader.Read()
txtAmount.Text = reader.GetString(1)
reader.Close()
Disconnect()
End Sub
Sub btnChange_Click(ByVal Sender As Object, ByVal E As EventArgs)
UpdateInventory()
LoadInventory()
End Sub
Private Sub UpdateInventory()
Dim strSQL As String = "UPDATE Inventory SET Number = " & txtAmount.Text & " WHERE Type = 'squares'"
Connect()
Dim dbComm As New OLEDBCommand(strSQL, objConnection)
dbComm.ExecuteNonQuery()
Disconnect()
End Subinstead of
Dim strSQL As String = "UPDATE Inventory SET Number = " & txtAmount.Text & " WHERE Type = 'squares'"
try this
Dim strSQL As String = "UPDATE Inventory SET Number = " & Convert.ToInt32(txtAmount.Text) & " WHERE Type = 'squares'"
Jeff
Jeff,
Thanks for your reply. That however didn't work. Could it be the way I have my access database setup?
Jeremy
Jeff,
Does it work when you try putting in a static value for txtAmount.Text such as this:
"UPDATE Inventory SET Number =1 WHERE Type='squares'"
If it does work like that, then try doing this:
Try
Dim dbComm As New OLEDBCommand(strSQL, objConnection)
dbComm.ExecuteNonQuery()
Catch dbException As Exception
Response.Write(dbException.ToString())
End Try
Tell us what the exception is. Besides, it is always good practice anyway to put database queries inside a try statement - there are just way too many things that could go wrong to not catch those errors.
Aaron
Trouble with ASP.NET databasing on XP
I'm having a heck of a time getting some ASP.NET code to run locally on XP with MDAC/ADO talking to a local access db. I know the code runs fine on IIS on Win2000 and Win2003. When I move it to my local XP system it won't work.
Anybody dealt with these issues in terms of permissions.
I opened up the permissions on the /temp folders. The issue seems to be that an .ldb file is created as the database is locked but it never seems to release it. The asp.net code just sits there an hangs with no error message.
Oh, sorry, I need to add a few things that folks are going to suggest.
1. All database connections are closed. In fact, the code runs fine on a real IIS server...so there is no chance that this is the problem.
2. Permissions. ASPNET, IUSR, System, Admin and WADMNET, USERS, etc. have Full Control to the folder and all files underneath.
Yes XP permssions config is hidden so you have to enable it to run. Try the url below for the steps. Hope this helps.
http://whoozoo.co.uk/winxpFilePerms.htm
Try the link below to see the database permissions. Hope this helps.
http://duhnetnuke2.net/Default.aspx?tabid=64
No, unfortunately, the first link shows you how to enable the sharing dialog and the file security dialogs in XP. I already have them enabled...I have too since as I already stated, I have set the permissions correctly on the .mdb and folder. Thats how I set the ASPNET account to have Full Control and IUSR_machinename account to have full control of the .mdb as well as the folder where the .mdb is located.
The second link describes using a SQL database. I really need this to work with Access locally.
However, I have gone through all of the things is the article to make sure thats what I got and confirm that my computer is set this way.
I still have the same problem. The database is permantly and perpetually locked with any single and with the first asp.net ADO access to it. Its never released--and thats the issue.
Trouble with connection string in web.config
Any help is greatly appreciated...
Bump, still stuck on this problem. Any help would be greatly appreciated.<configuration>
<appSettings>
<add key="ConnectionString" value="Server=localhost;database=msdb;Trusted_Connection=yes" />
</appSettings>
</configuration
Sub Page_Load(Sender as Object, E as EventArgs)
Dim strConnectionString as string = ConfigurationSettings.AppSettings("ConnectionString")
Dim strSQL As String = "SELECT * FROM log_shipping_databases"
Dim MyConnection as new Sqlconnection(strConnectionString)
Dim MyCommand as new SqlCommand(strSQL, MyConnection)MyConnection.Open()
MyDataGrid.DataSource = MyCommand.ExecuteReader()
MyDataGrid.DataBind()
MyConnection.Close()
End Sub
Have you had anything work from your web.config file?? The only thing I can think of is that your IIS application is not configured correctly. If this is the case, your .aspx pages will work, but IIS will not know where to look for your web.config file. This may not be the case at all....but it is my best guess at your problem. Check your site in IIS an make sure your application is configured correctly. And also double check to see that your web.config file is in the root of said application.
Hope that helps
-Jason
Jason,
Thanks for the reply. I went into IIS and made sure everything was ok, and as far as I can tell it seemed to be set up correctly. However, I deleted the existing virtual directory and created a brand new directory and set up the application again. It is still not working as intended though.
I also attempted to obtain other information that was contained in the web.config file and that did not work either.
Lastly, I am creating all my .aspx files in the root directory and that is where web.config resides as well.
Can you think of a particular setting I can check to verify everything is set up correctly? Thanks for the input thus far.
-Corey
Have you imported System.Configuration?
If you are going to use ConfigurationSettings.AppSettings("ConnectionString") then you need to import System.Configuration. I usually import System.Configuration.ConfigurationSettings and then just use AppSettings("ConnectionString") so there is less code to write.
Yes, I have also tried that as well. Below is the complete code for my project.
<%@. Page Language="VB" %>
Imports System.Configuration<script runat="server"
Sub Page_Load(Sender as Object, E as EventArgs)
Dim strConnectionString as string = ConfigurationSettings.AppSettings("ConnectionString")
Dim strSQL As String = "SELECT * FROM log_shipping_databases"
Dim MyConnection as new System.Data.OleDb.OleDbConnection(strConnectionString)
Dim MyCommand as new System.Data.OleDb.OleDBCommand(strSQL, MyConnection)MyConnection.Open()
MyDataGrid.DataSource = MyCommand.ExecuteReader()
MyDataGrid.DataBind()
MyConnection.Close()
End Sub</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:datagrid id="MyDataGrid" runat="server"></asp:datagrid>
</form>
</body>
</html
Delete any web.configs that are outside of your virtual apps.
This can cause problems.
So inside wwwroot there will be no web.config file, they will only be inside your applications folders.
HTH
Not that it matters in this case, but you got the syntax for importing a namespace wrong. It should have been:
<%@. Page Language="VB" %>
<%@. Import Namespace="System.Configuration" %>
It doesn't matter in this case, as it's not necessary. Your code, as shown, is sufficient to call information from web.config.
So, your problem is not in code. It is likely a setup problem. For example, the web.config file must go in the root folder of your Application. Like this:
c:\
\inetpub
\wwwroot
\MyApp
web.config
default.aspx
If you've placed it inside wwwroot, rather than the root of your own Application, this would cause your problem.
Hence, can you confirm that you've placed your web.config and your ASPX page in their own App folder, as shown? And that that app has been made a Web Application with IIS?
I think the following link could be useful.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconaspnetconfiguration.asp
The web.config is inheritable. This means you can have a web.config in wwwroot and in your application folder. When you call ConfigurationSettings.AppSettings("ConnectionString")
the MyApp web.config would be checked first. If that key isn't found then it would look in wwwroot. So, it is not required that you have a web.config in the app folder if you have one in wwwroot. I create a lot of applications that use a connection string so the connection string is placed in the wwwroot web.config that way it resides in one location. Then the web.config files in the app folder only hold application level settings.
Also, virtual roots or IIS applications do not affect this at all. I have tested it both ways. With or without a virtual root the web.config inheritance still works.
The last post is a good test but I don't think it's going to solve the problem. If you had a web.config in wwwroot and a connection string key in there, you wouldn't have to have a web.config in your application folder.
I actually am curious to see if the namespace correction mentioned above fixes things. SomeNewKid2, if he was using incorrect syntax on importing the namespace then I think it would matter, right? No namespace would mean no ConfigurationSettings.AppSettings exists to the application.
No, System.Configuration is a namespace that's implicitly imported with inline code. Hence, he can use ConfigurationSettings.AppSettings, without explicitly importing its namespace.
The way he had it meant it was simply considered literal text. No harm done, and it wouldn't have solved his problem even if his syntax was correct.
(I have used his own code to access a web.config. Works fine. The problem is not in his code.)
Below is where my web.config and default.aspx files reside:
c:\inetpub\wwwroot\training\web.config
c:\inetpub\wwwroot\training\default.aspx
Also, I have checked IIS to verify that it is set up as an application. I also deleted the virtual directory and setup it up as an application from scratch in IIS. I may very well be excluding a minor detail somewhere, but I can't seem to indetify it.
Thanks for all the help,
Corey
Back up your current default.aspx and web.config files. (Or just rename them temporarily.)
Try replacing your web.config with this very simple one:
<?xml version="1.0" encoding="UTF-8" ?>
<configuration
<appSettings>
<add key="ConnectionString" value="Server=localhost;database=msdb;Trusted_Connection=yes" />
</appSettings
<system.web>
</system.web
</configuration>
Now, replace your default.aspx with this modified version:
<%@. Page Language="VB" Debug="true" %
<script runat="server"
Sub Page_Load(Sender as Object, E as EventArgs)
Dim strConnectionString as string = ConfigurationSettings.AppSettings("ConnectionString")
Dim strSQL As String = "SELECT * FROM log_shipping_databases"
'Dim MyConnection as new System.Data.OleDb.OleDbConnection(strConnectionString)
'Dim MyCommand as new System.Data.OleDb.OleDBCommand(strSQL, MyConnection)'MyConnection.Open()
'MyDataGrid.DataSource = MyCommand.ExecuteReader()
'MyDataGrid.DataBind()
'MyConnection.Close()
Message.Text = strConnectionString
End Sub</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:datagrid id="MyDataGrid" runat="server"></asp:datagrid>
<asp:Label id="Message" runat="server" />
</form>
</body>
</html>
This code works fine on my machine. Let me know if it works okay on yours. (It should simply show the ConnectionString value that it retrieved from web.config.)
It prints the connection string to the browser:
Server=localhost;database=msdb;Trusted_Connection=yes
Which means it worked.
Well, the .aspx file is just a simplified version of your own. Which suggests that there is merely an error in your web.config file.
Since the web.config file is an XML file, it is very sensitive to syntax and proper nesting of statements.
You probably just have a statement in the wrong place.
Do you want to post the code for your web.config file?
Thursday, March 22, 2012
Trouble with office Sharepoint 2007 and dotnet 2003
I am new to Sharepoint Server. I was just trying to install sharepoint
server and work with it. I wanted to access the sharepoint server
services with dotnet and work with it. I just installed the hsarepoint
server on my system. Now i am in all sorts of trouble. I am now not
able to create any web service in ODtnet. When i try to create it pops
upa message box and i don't know wht to do.
the message is :
The default web access mode for this project is to file share, but the
project folder at http://localhost/servicename cann't be
opened with the path.
c:\Inetpub\wwwroor\wss\virtualdirectories\80\servc ename
Unable to create web project 'servicename' the file path c:\Inetpub
\wwwroor\wss\virtualdirectories\80\servcename doesnot coeerspond to
the url http://localhost/servicename. The two needed to map to
the same sever location. HTTP error found.
What would u like to do?
- Retry using a different file share path :
Location : c:\Inetpub\wwwroor\wss\virtualdirectories
\80\servcename
- Try to open the project with front page server extension
- workoffline
this is message that is poped.
I am not able to understand what it is trying to say.
If any one can please try to help me out and make me understand wht it
means and give a solution to work with this.
I am using office sharepoint 2007 and dotnet 2003
If anyone out here know the solution please help me.
Thanks for the help.
Regards,
Govardhan.Couple ways to fix this, reconfigure sharepoint to use a different port. Do
this from a re-install.
--
Regards,
Alvin Bruney
----------------
Shameless author plug
Excel Services for .NET is coming...
https://www.microsoft.com/MSPress/books/10933.aspx
OWC Black Book www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
"apondu" <apondu@.gmail.comwrote in message
news:1180508616.238096.157530@.n15g2000prd.googlegr oups.com...
Quote:
Originally Posted by
hi,
>
I am new to Sharepoint Server. I was just trying to install sharepoint
server and work with it. I wanted to access the sharepoint server
services with dotnet and work with it. I just installed the hsarepoint
server on my system. Now i am in all sorts of trouble. I am now not
able to create any web service in ODtnet. When i try to create it pops
upa message box and i don't know wht to do.
>
the message is :
>
The default web access mode for this project is to file share, but the
project folder at http://localhost/servicename cann't be
opened with the path.
>
c:\Inetpub\wwwroor\wss\virtualdirectories\80\servc ename
>
Unable to create web project 'servicename' the file path c:\Inetpub
\wwwroor\wss\virtualdirectories\80\servcename doesnot coeerspond to
the url http://localhost/servicename. The two needed to map to
the same sever location. HTTP error found.
>
What would u like to do?
>
- Retry using a different file share path :
>
Location : c:\Inetpub\wwwroor\wss\virtualdirectories
\80\servcename
>
- Try to open the project with front page server extension
>
- workoffline
>
>
>
>
this is message that is poped.
>
I am not able to understand what it is trying to say.
>
If any one can please try to help me out and make me understand wht it
means and give a solution to work with this.
>
I am using office sharepoint 2007 and dotnet 2003
>
If anyone out here know the solution please help me.
>
Thanks for the help.
>
Regards,
Govardhan.
>
Trouble with office Sharepoint 2007 and dotnet 2003
I am new to Sharepoint Server. I was just trying to install sharepoint
server and work with it. I wanted to access the sharepoint server
services with dotnet and work with it. I just installed the hsarepoint
server on my system. Now i am in all sorts of trouble. I am now not
able to create any web service in ODtnet. When i try to create it pops
upa message box and i don't know wht to do.
the message is :
The default web access mode for this project is to file share, but the
project folder at http://localhost/servicename cann't be
opened with the path.
c:\Inetpub\wwwroor\wss\virtualdirectorie
s\80\servcename
Unable to create web project 'servicename' the file path c:\Inetpub
\wwwroor\wss\virtualdirectories\80\servc
ename doesnot coeerspond to
the url http://localhost/servicename. The two needed to map to
the same sever location. HTTP error found.
What would u like to do?
- Retry using a different file share path :
Location : c:\Inetpub\wwwroor\wss\virtualdirectorie
s
\80\servcename
- Try to open the project with front page server extension
- workoffline
this is message that is poped.
I am not able to understand what it is trying to say.
If any one can please try to help me out and make me understand wht it
means and give a solution to work with this.
I am using office sharepoint 2007 and dotnet 2003
If anyone out here know the solution please help me.
Thanks for the help.
Regards,
Govardhan.Couple ways to fix this, reconfigure sharepoint to use a different port. Do
this from a re-install.
Regards,
Alvin Bruney
---
Shameless author plug
Excel Services for .NET is coming...
https://www.microsoft.com/MSPress/books/10933.aspx
OWC Black Book www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
"apondu" <apondu@.gmail.com> wrote in message
news:1180508616.238096.157530@.n15g2000prd.googlegroups.com...
> hi,
> I am new to Sharepoint Server. I was just trying to install sharepoint
> server and work with it. I wanted to access the sharepoint server
> services with dotnet and work with it. I just installed the hsarepoint
> server on my system. Now i am in all sorts of trouble. I am now not
> able to create any web service in ODtnet. When i try to create it pops
> upa message box and i don't know wht to do.
> the message is :
> The default web access mode for this project is to file share, but the
> project folder at http://localhost/servicename cann't be
> opened with the path.
> c:\Inetpub\wwwroor\wss\virtualdirectorie
s\80\servcename
> Unable to create web project 'servicename' the file path c:\Inetpub
> \wwwroor\wss\virtualdirectories\80\servc
ename doesnot coeerspond to
> the url http://localhost/servicename. The two needed to map to
> the same sever location. HTTP error found.
> What would u like to do?
> - Retry using a different file share path :
> Location : c:\Inetpub\wwwroor\wss\virtualdirectorie
s
> \80\servcename
> - Try to open the project with front page server extension
> - workoffline
>
>
> this is message that is poped.
> I am not able to understand what it is trying to say.
> If any one can please try to help me out and make me understand wht it
> means and give a solution to work with this.
> I am using office sharepoint 2007 and dotnet 2003
> If anyone out here know the solution please help me.
> Thanks for the help.
> Regards,
> Govardhan.
>
Trouble with QueryString
I access a particular page by specifying the page's name and extension like
so:
http://localhost:xxxx/MyFiles/Lucky/
The Lucky directory contains a webpage named Default.aspx. I can access is
without needing to type in the page's name and
extension. This page uses a querystring and is only specified when needed (
e.g. keywords=sam). My trouble is that if I
access the page without specifying the page's name and extension, somehow th
e querystring is given a value on its own.
Debugging reveals that the querystring contains the value of "default.aspx"
What could be causing this issue? I've been at this for a few hours now wit
h no luck. Any help would be greatly appreciated.
Thanks,
RoshawnRoshawn,
Are you doing any URL rewriting or redirection? I've seen this
before when doing redirection and not filtering out the default page as a
possible value.
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199...2006
"Roshawn" <radawson218@.yahoo.com> wrote in message
news:%2374iTQNRHHA.2124@.TK2MSFTNGP06.phx.gbl...
> Hi,
> I access a particular page by specifying the page's name and extension
> like so:
> http://localhost:xxxx/MyFiles/Lucky/
> The Lucky directory contains a webpage named Default.aspx. I can access
> is without needing to type in the page's name and extension. This page
> uses a querystring and is only specified when needed (e.g. keywords=sam).
> My trouble is that if I access the page without specifying the page's name
> and extension, somehow the querystring is given a value on its own.
> Debugging reveals that the querystring contains the value of
> "default.aspx"
> What could be causing this issue? I've been at this for a few hours now
> with no luck. Any help would be greatly appreciated.
> Thanks,
> Roshawn
Hmm, you're absolutely right!
I am doing URL rewriting, using Regex of course. I discovered that one of m
y Regex rules was incorrect. That's what was
causing the trouble as I wasn't filtering out the default page.
Thanks for the help, :-)
Roshawn
Mark Fitzpatrick wrote:
> Roshawn,
> Are you doing any URL rewriting or redirection? I've seen this
> before when doing redirection and not filtering out the default page as a
> possible value.
>
Trouble with QueryString
I access a particular page by specifying the page's name and extension like so:
http://localhost:xxxx/MyFiles/Lucky/
The Lucky directory contains a webpage named Default.aspx. I can access is without needing to type in the page's name and
extension. This page uses a querystring and is only specified when needed (e.g. keywords=sam). My trouble is that if I
access the page without specifying the page's name and extension, somehow the querystring is given a value on its own.
Debugging reveals that the querystring contains the value of "default.aspx"
What could be causing this issue? I've been at this for a few hours now with no luck. Any help would be greatly appreciated.
Thanks,
RoshawnRoshawn,
Are you doing any URL rewriting or redirection? I've seen this
before when doing redirection and not filtering out the default page as a
possible value.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Roshawn" <radawson218@.yahoo.comwrote in message
news:%2374iTQNRHHA.2124@.TK2MSFTNGP06.phx.gbl...
Quote:
Originally Posted by
Hi,
>
I access a particular page by specifying the page's name and extension
like so:
>
http://localhost:xxxx/MyFiles/Lucky/
>
The Lucky directory contains a webpage named Default.aspx. I can access
is without needing to type in the page's name and extension. This page
uses a querystring and is only specified when needed (e.g. keywords=sam).
My trouble is that if I access the page without specifying the page's name
and extension, somehow the querystring is given a value on its own.
Debugging reveals that the querystring contains the value of
"default.aspx"
>
What could be causing this issue? I've been at this for a few hours now
with no luck. Any help would be greatly appreciated.
>
Thanks,
Roshawn
Hmm, you're absolutely right!
I am doing URL rewriting, using Regex of course. I discovered that one of my Regex rules was incorrect. That's what was
causing the trouble as I wasn't filtering out the default page.
Thanks for the help, :-)
Roshawn
Mark Fitzpatrick wrote:
Quote:
Originally Posted by
Roshawn,
Are you doing any URL rewriting or redirection? I've seen this
before when doing redirection and not filtering out the default page as a
possible value.
>
Tuesday, March 13, 2012
Trouble with time
Hi,
I'm importing some data from a text file but I have a field that looks like this
30/12/1899 15:25:00
it is time field from an access DB that when exported shows the date and time (ie date = 0) now I want just the time to put into an SQL Server.
The only thing I can think to do is treat it as a string and cut it up to get '15:25:00' and then to put that into a char field in the DB.
There has to be a better way? can anyone help?
Thanks
Hello, if you are storing your date in a string format you can do this:// Long Time
string LongTime = DateTime.Now.ToString( "T" );
// => Displays 3:47:37 PM
regards
Thanks that works nicely.
I am glad I was able to help. But watch out, if you intend to do datecomparison, that is not a good solution, its then better to storeDateTime in a DateTime field.
regards
trouble with web forms
web form using visual basic.net. ive set up the database as a file
dsn.
this is my connection string:
DBQ=C:\Program Files\Microsoft
Office\OFFICE11\SAMPLES\Northwind.mdb;DefaultDir=C:\Program
Files\Microsoft Office\OFFICE11\SAMPLES;Driver={Microsof
t Access Driver
(*.mdb)};DriverId=25;FIL=MS Access;FILEDSN=C:\Program Files\Common
Files\ODBC\Data
Sources\test2. dsn;MaxBufferSize=2048;MaxScanRows=8;Pag
eTimeout=5;SafeTransac
tions=0;Threads=3;UID=admin;UserCommitSy
nc=Yes;
works fine when i try it with a windows form, however with the webform,
when i try it, i get the following errors because of line69 :
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC
Driver Manager] Driver's SQLSetConnectAttr failed ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
Access Driver] Could not use '(unknown)'; file already in use. ERROR
[HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable
to open registry key 'Temporary (volatile) Jet DSN for process 0x3a4
Thread 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC
Microsoft Access Driver]General error Unable to open registry key
'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
Could not use '(unknown)'; file already in use.
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.Odbc.OdbcException: ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager]
Driver's SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC
Microsoft Access Driver]General error Unable to open registry key
'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
Could not use '(unknown)'; file already in use. ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
Access Driver]General error Unable to open registry key 'Temporary
(volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use.
Source Error:
Line 67: Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
Line 68: DataSet11.Clear()
Line 69: OdbcDataAdapter1.Fill(DataSet11)
Line 70: DataGrid1.DataBind()
Line 71: End Sub
Source File: c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb Line: 69
Stack Trace:
[OdbcException: ERROR [HY000] [Microsoft][ODBC Microsoft Access
Driver]General error Unable to open registry key 'Temporary (volatile)
Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use.]
System.Data.Odbc.OdbcConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
TestWeb1.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb:69
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
This is my code:
Public Class WebForm1
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.OdbcSelectCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcInsertCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcConnection1 = New System.Data.Odbc.OdbcConnection
Me.OdbcDataAdapter1 = New System.Data.Odbc.OdbcDataAdapter
Me.DataSet11 = New TestWeb1.DataSet1
CType(Me.DataSet11,
System.ComponentModel.ISupportInitialize).BeginInit()
'
'OdbcSelectCommand1
'
Me.OdbcSelectCommand1.CommandText = "SELECT ShipperID,
CompanyName, Phone FROM Shippers"
Me.OdbcSelectCommand1.Connection = Me.OdbcConnection1
'
'OdbcInsertCommand1
'
Me.OdbcInsertCommand1.CommandText = "INSERT INTO
Shippers(CompanyName, Phone) VALUES (?, ?)"
Me.OdbcInsertCommand1.Connection = Me.OdbcConnection1
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("CompanyName",
System.Data.Odbc.OdbcType.NVarChar, 40, "CompanyName"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("Phone",
System.Data.Odbc.OdbcType.NVarChar, 24, "Phone"))
'
'OdbcConnection1
'
Me.OdbcConnection1.ConnectionString =
" PageTimeout=5;MaxScanRows=8;DefaultDir=C
:\Program Files\Microsoft
Office\OFFICE11" & _
"\SAMPLES;FILEDSN=C:\Program Files\Common Files\ODBC\Data
Sources\test2.dsn;Drive" & _
"rId=25;DBQ=C:\Program Files\Microsoft
Office\OFFICE11\SAMPLES\Northwind.mdb;User" & _
"CommitSync=Yes;FIL=MS Access;UID=admin;Driver={Microsoft
Access Driver (*.mdb)};" & _
" MaxBufferSize=2048;Threads=3;SafeTransac
tions=0"
'
'OdbcDataAdapter1
'
Me.OdbcDataAdapter1.InsertCommand = Me.OdbcInsertCommand1
Me.OdbcDataAdapter1.SelectCommand = Me.OdbcSelectCommand1
Me.OdbcDataAdapter1.TableMappings.AddRange(New
System.Data.Common.DataTableMapping() {New
System.Data.Common.DataTableMapping("Table", "Shippers", New
System.Data.Common.DataColumnMapping() {New
System.Data.Common.DataColumnMapping("ShipperID", "ShipperID"), New
System.Data.Common.DataColumnMapping("CompanyName", "CompanyName"), New
System.Data.Common.DataColumnMapping("Phone", "Phone")})})
'
'DataSet11
'
Me.DataSet11.DataSetName = "DataSet1"
Me.DataSet11.Locale = New
System.Globalization.CultureInfo("en-IE")
CType(Me.DataSet11,
System.ComponentModel.ISupportInitialize).EndInit()
End Sub
Protected WithEvents OdbcSelectCommand1 As
System.Data.Odbc.OdbcCommand
Protected WithEvents OdbcInsertCommand1 As
System.Data.Odbc.OdbcCommand
Protected WithEvents OdbcConnection1 As
System.Data.Odbc.OdbcConnection
Protected WithEvents OdbcDataAdapter1 As
System.Data.Odbc.OdbcDataAdapter
Protected WithEvents DataSet11 As TestWeb1.DataSet1
Protected WithEvents DataGrid1 As
System.Web.UI.WebControls.DataGrid
'NOTE: The following placeholder declaration is required by the Web
Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
DataSet11.Clear()
OdbcDataAdapter1.Fill(DataSet11)
DataGrid1.DataBind()
End Sub
End Class
iv been tryin to sort this for a couple of days but am completely at a
loss as to how to sort this. Can anyone help?Well, I could be wrong since I haven't seen every detail of your setup or
code, but that looks like a very strange connection string. Here are some
things I would check:
1. Directories rarely start with the drive letter (C:) when dealing with the
web.
2. Your connection string looks much more complicated than necessary. Here
is the line that I use to create my connections in all the websites I have
created that use Access databases (and they have been on different servers,
so unless you have a strange setup I'm guessing it will work for you too):
Dim myconnection As New
OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" &
Server.MapPath("/mydatabase.mdb"))
Just modify the last part to be the correct path to your *.mdb file.
3. Check the permissions on the *.mdb file to make sure ASPNET has
permission to access it.
Although something that I am kind of getting the impression of is that you
require a more full-featured and secure database, Access was not really
intended for web-related stuff. If you have a very big company or plan to
use the database heavily, I would put in the effort and money to buy either
Oracle or SQL Server (you would probably prefer SQL Server since you are
coming from Access). I am only a student, but ASP.NET and Web Development
are my areas of concentration and these are things I have been taught and
gained through experience and articles I have read. Good Luck!
--
Nathan Sokalski
njsokalski@.hotmail.com
http://www.nathansokalski.com/
<somersbar@.yahoo.com> wrote in message
news:1140106859.776998.150120@.z14g2000cwz.googlegroups.com...
> im trying to get a table from a microsoft access database on a simple
> web form using visual basic.net. ive set up the database as a file
> dsn.
> this is my connection string:
> DBQ=C:\Program Files\Microsoft
> Office\OFFICE11\SAMPLES\Northwind.mdb;DefaultDir=C:\Program
> Files\Microsoft Office\OFFICE11\SAMPLES;Driver={Microsof
t Access Driver
> (*.mdb)};DriverId=25;FIL=MS Access;FILEDSN=C:\Program Files\Common
> Files\ODBC\Data
> Sources\test2. dsn;MaxBufferSize=2048;MaxScanRows=8;Pag
eTimeout=5;SafeTrans
actions=0;Threads=3;UID=admin;UserCommit
Sync=Yes;
>
> works fine when i try it with a windows form, however with the webform,
> when i try it, i get the following errors because of line69 :
>
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC
> Driver Manager] Driver's SQLSetConnectAttr failed ERROR [HY000]
> [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
> registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
> 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
> Access Driver] Could not use '(unknown)'; file already in use. ERROR
> [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable
> to open registry key 'Temporary (volatile) Jet DSN for process 0x3a4
> Thread 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC
> Microsoft Access Driver]General error Unable to open registry key
> 'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
> 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
> Could not use '(unknown)'; file already in use.
> 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.Odbc.OdbcException: ERROR [HY000]
> [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
> registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
> 0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager]
> Driver's SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC
> Microsoft Access Driver]General error Unable to open registry key
> 'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
> 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
> Could not use '(unknown)'; file already in use. ERROR [HY000]
> [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
> registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
> 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
> Access Driver]General error Unable to open registry key 'Temporary
> (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
> '(unknown)'; file already in use.
> Source Error:
> Line 67: Private Sub Page_Load(ByVal sender As System.Object, ByVal
> e As System.EventArgs) Handles MyBase.Load
> Line 68: DataSet11.Clear()
> Line 69: OdbcDataAdapter1.Fill(DataSet11)
> Line 70: DataGrid1.DataBind()
> Line 71: End Sub
>
> Source File: c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb Line: 69
> Stack Trace:
> [OdbcException: ERROR [HY000] [Microsoft][ODBC Microsoft Access
> Driver]General error Unable to open registry key 'Temporary (volatile)
> Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
> SQLSetConnectAttr failed
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
> '(unknown)'; file already in use.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
> '(unknown)'; file already in use.]
> System.Data.Odbc.OdbcConnection.Open()
> System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
> ConnectionState& originalState)
> System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
> CommandBehavior behavior)
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
> CommandBehavior behavior)
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
> TestWeb1.WebForm1.Page_Load(Object sender, EventArgs e) in
> c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb:69
> System.Web.UI.Control.OnLoad(EventArgs e)
> System.Web.UI.Control.LoadRecursive()
> System.Web.UI.Page.ProcessRequestMain()
>
>
> This is my code:
> Public Class WebForm1
> Inherits System.Web.UI.Page
> #Region " Web Form Designer Generated Code "
> 'This call is required by the Web Form Designer.
> <System.Diagnostics.DebuggerStepThrough()> Private Sub
> InitializeComponent()
> Me.OdbcSelectCommand1 = New System.Data.Odbc.OdbcCommand
> Me.OdbcInsertCommand1 = New System.Data.Odbc.OdbcCommand
> Me.OdbcConnection1 = New System.Data.Odbc.OdbcConnection
> Me.OdbcDataAdapter1 = New System.Data.Odbc.OdbcDataAdapter
> Me.DataSet11 = New TestWeb1.DataSet1
> CType(Me.DataSet11,
> System.ComponentModel.ISupportInitialize).BeginInit()
> '
> 'OdbcSelectCommand1
> '
> Me.OdbcSelectCommand1.CommandText = "SELECT ShipperID,
> CompanyName, Phone FROM Shippers"
> Me.OdbcSelectCommand1.Connection = Me.OdbcConnection1
> '
> 'OdbcInsertCommand1
> '
> Me.OdbcInsertCommand1.CommandText = "INSERT INTO
> Shippers(CompanyName, Phone) VALUES (?, ?)"
> Me.OdbcInsertCommand1.Connection = Me.OdbcConnection1
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("CompanyName",
> System.Data.Odbc.OdbcType.NVarChar, 40, "CompanyName"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("Phone",
> System.Data.Odbc.OdbcType.NVarChar, 24, "Phone"))
> '
> 'OdbcConnection1
> '
> Me.OdbcConnection1.ConnectionString =
> " PageTimeout=5;MaxScanRows=8;DefaultDir=C
:\Program Files\Microsoft
> Office\OFFICE11" & _
> "\SAMPLES;FILEDSN=C:\Program Files\Common Files\ODBC\Data
> Sources\test2.dsn;Drive" & _
> "rId=25;DBQ=C:\Program Files\Microsoft
> Office\OFFICE11\SAMPLES\Northwind.mdb;User" & _
> "CommitSync=Yes;FIL=MS Access;UID=admin;Driver={Microsoft
> Access Driver (*.mdb)};" & _
> " MaxBufferSize=2048;Threads=3;SafeTransac
tions=0"
> '
> 'OdbcDataAdapter1
> '
> Me.OdbcDataAdapter1.InsertCommand = Me.OdbcInsertCommand1
> Me.OdbcDataAdapter1.SelectCommand = Me.OdbcSelectCommand1
> Me.OdbcDataAdapter1.TableMappings.AddRange(New
> System.Data.Common.DataTableMapping() {New
> System.Data.Common.DataTableMapping("Table", "Shippers", New
> System.Data.Common.DataColumnMapping() {New
> System.Data.Common.DataColumnMapping("ShipperID", "ShipperID"), New
> System.Data.Common.DataColumnMapping("CompanyName", "CompanyName"), New
> System.Data.Common.DataColumnMapping("Phone", "Phone")})})
> '
> 'DataSet11
> '
> Me.DataSet11.DataSetName = "DataSet1"
> Me.DataSet11.Locale = New
> System.Globalization.CultureInfo("en-IE")
> CType(Me.DataSet11,
> System.ComponentModel.ISupportInitialize).EndInit()
> End Sub
> Protected WithEvents OdbcSelectCommand1 As
> System.Data.Odbc.OdbcCommand
> Protected WithEvents OdbcInsertCommand1 As
> System.Data.Odbc.OdbcCommand
> Protected WithEvents OdbcConnection1 As
> System.Data.Odbc.OdbcConnection
> Protected WithEvents OdbcDataAdapter1 As
> System.Data.Odbc.OdbcDataAdapter
> Protected WithEvents DataSet11 As TestWeb1.DataSet1
> Protected WithEvents DataGrid1 As
> System.Web.UI.WebControls.DataGrid
> 'NOTE: The following placeholder declaration is required by the Web
> Form Designer.
> 'Do not delete or move it.
> Private designerPlaceholderDeclaration As System.Object
> Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Init
> 'CODEGEN: This method call is required by the Web Form Designer
> 'Do not modify it using the code editor.
> InitializeComponent()
> End Sub
> #End Region
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> DataSet11.Clear()
> OdbcDataAdapter1.Fill(DataSet11)
> DataGrid1.DataBind()
> End Sub
> End Class
>
> iv been tryin to sort this for a couple of days but am completely at a
> loss as to how to sort this. Can anyone help?
>
Do you have Office installed on your server?
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."
<somersbar@.yahoo.com> wrote in message
news:1140106859.776998.150120@.z14g2000cwz.googlegroups.com...
> im trying to get a table from a microsoft access database on a simple
> web form using visual basic.net. ive set up the database as a file
> dsn.
> this is my connection string:
> DBQ=C:\Program Files\Microsoft
> Office\OFFICE11\SAMPLES\Northwind.mdb;DefaultDir=C:\Program
> Files\Microsoft Office\OFFICE11\SAMPLES;Driver={Microsof
t Access Driver
> (*.mdb)};DriverId=25;FIL=MS Access;FILEDSN=C:\Program Files\Common
> Files\ODBC\Data
> Sources\test2. dsn;MaxBufferSize=2048;MaxScanRows=8;Pag
eTimeout=5;SafeTrans
actions=0;Threads=3;UID=admin;UserCommit
Sync=Yes;
>
> works fine when i try it with a windows form, however with the webform,
> when i try it, i get the following errors because of line69 :
>
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC
> Driver Manager] Driver's SQLSetConnectAttr failed ERROR [HY000]
> [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
> registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
> 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
> Access Driver] Could not use '(unknown)'; file already in use. ERROR
> [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable
> to open registry key 'Temporary (volatile) Jet DSN for process 0x3a4
> Thread 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC
> Microsoft Access Driver]General error Unable to open registry key
> 'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
> 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
> Could not use '(unknown)'; file already in use.
> 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.Odbc.OdbcException: ERROR [HY000]
> [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
> registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
> 0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager]
> Driver's SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC
> Microsoft Access Driver]General error Unable to open registry key
> 'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
> 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
> Could not use '(unknown)'; file already in use. ERROR [HY000]
> [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
> registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
> 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
> Access Driver]General error Unable to open registry key 'Temporary
> (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
> '(unknown)'; file already in use.
> Source Error:
> Line 67: Private Sub Page_Load(ByVal sender As System.Object, ByVal
> e As System.EventArgs) Handles MyBase.Load
> Line 68: DataSet11.Clear()
> Line 69: OdbcDataAdapter1.Fill(DataSet11)
> Line 70: DataGrid1.DataBind()
> Line 71: End Sub
>
> Source File: c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb Line: 69
> Stack Trace:
> [OdbcException: ERROR [HY000] [Microsoft][ODBC Microsoft Access
> Driver]General error Unable to open registry key 'Temporary (volatile)
> Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
> SQLSetConnectAttr failed
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
> '(unknown)'; file already in use.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
> '(unknown)'; file already in use.]
> System.Data.Odbc.OdbcConnection.Open()
> System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
> ConnectionState& originalState)
> System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
> CommandBehavior behavior)
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
> CommandBehavior behavior)
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
> TestWeb1.WebForm1.Page_Load(Object sender, EventArgs e) in
> c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb:69
> System.Web.UI.Control.OnLoad(EventArgs e)
> System.Web.UI.Control.LoadRecursive()
> System.Web.UI.Page.ProcessRequestMain()
>
>
> This is my code:
> Public Class WebForm1
> Inherits System.Web.UI.Page
> #Region " Web Form Designer Generated Code "
> 'This call is required by the Web Form Designer.
> <System.Diagnostics.DebuggerStepThrough()> Private Sub
> InitializeComponent()
> Me.OdbcSelectCommand1 = New System.Data.Odbc.OdbcCommand
> Me.OdbcInsertCommand1 = New System.Data.Odbc.OdbcCommand
> Me.OdbcConnection1 = New System.Data.Odbc.OdbcConnection
> Me.OdbcDataAdapter1 = New System.Data.Odbc.OdbcDataAdapter
> Me.DataSet11 = New TestWeb1.DataSet1
> CType(Me.DataSet11,
> System.ComponentModel.ISupportInitialize).BeginInit()
> '
> 'OdbcSelectCommand1
> '
> Me.OdbcSelectCommand1.CommandText = "SELECT ShipperID,
> CompanyName, Phone FROM Shippers"
> Me.OdbcSelectCommand1.Connection = Me.OdbcConnection1
> '
> 'OdbcInsertCommand1
> '
> Me.OdbcInsertCommand1.CommandText = "INSERT INTO
> Shippers(CompanyName, Phone) VALUES (?, ?)"
> Me.OdbcInsertCommand1.Connection = Me.OdbcConnection1
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("CompanyName",
> System.Data.Odbc.OdbcType.NVarChar, 40, "CompanyName"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("Phone",
> System.Data.Odbc.OdbcType.NVarChar, 24, "Phone"))
> '
> 'OdbcConnection1
> '
> Me.OdbcConnection1.ConnectionString =
> " PageTimeout=5;MaxScanRows=8;DefaultDir=C
:\Program Files\Microsoft
> Office\OFFICE11" & _
> "\SAMPLES;FILEDSN=C:\Program Files\Common Files\ODBC\Data
> Sources\test2.dsn;Drive" & _
> "rId=25;DBQ=C:\Program Files\Microsoft
> Office\OFFICE11\SAMPLES\Northwind.mdb;User" & _
> "CommitSync=Yes;FIL=MS Access;UID=admin;Driver={Microsoft
> Access Driver (*.mdb)};" & _
> " MaxBufferSize=2048;Threads=3;SafeTransac
tions=0"
> '
> 'OdbcDataAdapter1
> '
> Me.OdbcDataAdapter1.InsertCommand = Me.OdbcInsertCommand1
> Me.OdbcDataAdapter1.SelectCommand = Me.OdbcSelectCommand1
> Me.OdbcDataAdapter1.TableMappings.AddRange(New
> System.Data.Common.DataTableMapping() {New
> System.Data.Common.DataTableMapping("Table", "Shippers", New
> System.Data.Common.DataColumnMapping() {New
> System.Data.Common.DataColumnMapping("ShipperID", "ShipperID"), New
> System.Data.Common.DataColumnMapping("CompanyName", "CompanyName"), New
> System.Data.Common.DataColumnMapping("Phone", "Phone")})})
> '
> 'DataSet11
> '
> Me.DataSet11.DataSetName = "DataSet1"
> Me.DataSet11.Locale = New
> System.Globalization.CultureInfo("en-IE")
> CType(Me.DataSet11,
> System.ComponentModel.ISupportInitialize).EndInit()
> End Sub
> Protected WithEvents OdbcSelectCommand1 As
> System.Data.Odbc.OdbcCommand
> Protected WithEvents OdbcInsertCommand1 As
> System.Data.Odbc.OdbcCommand
> Protected WithEvents OdbcConnection1 As
> System.Data.Odbc.OdbcConnection
> Protected WithEvents OdbcDataAdapter1 As
> System.Data.Odbc.OdbcDataAdapter
> Protected WithEvents DataSet11 As TestWeb1.DataSet1
> Protected WithEvents DataGrid1 As
> System.Web.UI.WebControls.DataGrid
> 'NOTE: The following placeholder declaration is required by the Web
> Form Designer.
> 'Do not delete or move it.
> Private designerPlaceholderDeclaration As System.Object
> Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Init
> 'CODEGEN: This method call is required by the Web Form Designer
> 'Do not modify it using the code editor.
> InitializeComponent()
> End Sub
> #End Region
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> DataSet11.Clear()
> OdbcDataAdapter1.Fill(DataSet11)
> DataGrid1.DataBind()
> End Sub
> End Class
>
> iv been tryin to sort this for a couple of days but am completely at a
> loss as to how to sort this. Can anyone help?
>
trouble with web forms
web form using visual basic.net. ive set up the database as a file
dsn.
this is my connection string:
DBQ=C:\Program Files\Microsoft
Office\OFFICE11\SAMPLES\Northwind.mdb;DefaultDir=C :\Program
Files\Microsoft Office\OFFICE11\SAMPLES;Driver={Microsoft Access Driver
(*.mdb)};DriverId=25;FIL=MS Access;FILEDSN=C:\Program Files\Common
Files\ODBC\Data
Sources\test2.dsn;MaxBufferSize=2048;MaxScanRows=8 ;PageTimeout=5;SafeTransactions=0;Threads=3;UID=ad min;UserCommitSync=Yes;
works fine when i try it with a windows form, however with the webform,
when i try it, i get the following errors because of line69 :
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC
Driver Manager] Driver's SQLSetConnectAttr failed ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
Access Driver] Could not use '(unknown)'; file already in use. ERROR
[HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable
to open registry key 'Temporary (volatile) Jet DSN for process 0x3a4
Thread 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC
Microsoft Access Driver]General error Unable to open registry key
'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
Could not use '(unknown)'; file already in use.
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.Odbc.OdbcException: ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager]
Driver's SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC
Microsoft Access Driver]General error Unable to open registry key
'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
Could not use '(unknown)'; file already in use. ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
Access Driver]General error Unable to open registry key 'Temporary
(volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use.
Source Error:
Line 67: Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
Line 68: DataSet11.Clear()
Line 69: OdbcDataAdapter1.Fill(DataSet11)
Line 70: DataGrid1.DataBind()
Line 71: End Sub
Source File: c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb Line: 69
Stack Trace:
[OdbcException: ERROR [HY000] [Microsoft][ODBC Microsoft Access
Driver]General error Unable to open registry key 'Temporary (volatile)
Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use.]
System.Data.Odbc.OdbcConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
TestWeb1.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb:69
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
This is my code:
Public Class WebForm1
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.OdbcSelectCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcInsertCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcConnection1 = New System.Data.Odbc.OdbcConnection
Me.OdbcDataAdapter1 = New System.Data.Odbc.OdbcDataAdapter
Me.DataSet11 = New TestWeb1.DataSet1
CType(Me.DataSet11,
System.ComponentModel.ISupportInitialize).BeginIni t()
'
'OdbcSelectCommand1
'
Me.OdbcSelectCommand1.CommandText = "SELECT ShipperID,
CompanyName, Phone FROM Shippers"
Me.OdbcSelectCommand1.Connection = Me.OdbcConnection1
'
'OdbcInsertCommand1
'
Me.OdbcInsertCommand1.CommandText = "INSERT INTO
Shippers(CompanyName, Phone) VALUES (?, ?)"
Me.OdbcInsertCommand1.Connection = Me.OdbcConnection1
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("CompanyName",
System.Data.Odbc.OdbcType.NVarChar, 40, "CompanyName"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("Phone",
System.Data.Odbc.OdbcType.NVarChar, 24, "Phone"))
'
'OdbcConnection1
'
Me.OdbcConnection1.ConnectionString =
"PageTimeout=5;MaxScanRows=8;DefaultDir=C:\Program Files\Microsoft
Office\OFFICE11" & _
"\SAMPLES;FILEDSN=C:\Program Files\Common Files\ODBC\Data
Sources\test2.dsn;Drive" & _
"rId=25;DBQ=C:\Program Files\Microsoft
Office\OFFICE11\SAMPLES\Northwind.mdb;User" & _
"CommitSync=Yes;FIL=MS Access;UID=admin;Driver={Microsoft
Access Driver (*.mdb)};" & _
"MaxBufferSize=2048;Threads=3;SafeTransactions=0"
'
'OdbcDataAdapter1
'
Me.OdbcDataAdapter1.InsertCommand = Me.OdbcInsertCommand1
Me.OdbcDataAdapter1.SelectCommand = Me.OdbcSelectCommand1
Me.OdbcDataAdapter1.TableMappings.AddRange(New
System.Data.Common.DataTableMapping() {New
System.Data.Common.DataTableMapping("Table", "Shippers", New
System.Data.Common.DataColumnMapping() {New
System.Data.Common.DataColumnMapping("ShipperID", "ShipperID"), New
System.Data.Common.DataColumnMapping("CompanyName", "CompanyName"), New
System.Data.Common.DataColumnMapping("Phone", "Phone")})})
'
'DataSet11
'
Me.DataSet11.DataSetName = "DataSet1"
Me.DataSet11.Locale = New
System.Globalization.CultureInfo("en-IE")
CType(Me.DataSet11,
System.ComponentModel.ISupportInitialize).EndInit( )
End Sub
Protected WithEvents OdbcSelectCommand1 As
System.Data.Odbc.OdbcCommand
Protected WithEvents OdbcInsertCommand1 As
System.Data.Odbc.OdbcCommand
Protected WithEvents OdbcConnection1 As
System.Data.Odbc.OdbcConnection
Protected WithEvents OdbcDataAdapter1 As
System.Data.Odbc.OdbcDataAdapter
Protected WithEvents DataSet11 As TestWeb1.DataSet1
Protected WithEvents DataGrid1 As
System.Web.UI.WebControls.DataGrid
'NOTE: The following placeholder declaration is required by the Web
Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
DataSet11.Clear()
OdbcDataAdapter1.Fill(DataSet11)
DataGrid1.DataBind()
End Sub
End Class
iv been tryin to sort this for a couple of days but am completely at a
loss as to how to sort this. Can anyone help?Well, I could be wrong since I haven't seen every detail of your setup or
code, but that looks like a very strange connection string. Here are some
things I would check:
1. Directories rarely start with the drive letter (C:) when dealing with the
web.
2. Your connection string looks much more complicated than necessary. Here
is the line that I use to create my connections in all the websites I have
created that use Access databases (and they have been on different servers,
so unless you have a strange setup I'm guessing it will work for you too):
Dim myconnection As New
OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" &
Server.MapPath("/mydatabase.mdb"))
Just modify the last part to be the correct path to your *.mdb file.
3. Check the permissions on the *.mdb file to make sure ASPNET has
permission to access it.
Although something that I am kind of getting the impression of is that you
require a more full-featured and secure database, Access was not really
intended for web-related stuff. If you have a very big company or plan to
use the database heavily, I would put in the effort and money to buy either
Oracle or SQL Server (you would probably prefer SQL Server since you are
coming from Access). I am only a student, but ASP.NET and Web Development
are my areas of concentration and these are things I have been taught and
gained through experience and articles I have read. Good Luck!
--
Nathan Sokalski
njsokalski@.hotmail.com
http://www.nathansokalski.com/
<somersbar@.yahoo.com> wrote in message
news:1140106859.776998.150120@.z14g2000cwz.googlegr oups.com...
> im trying to get a table from a microsoft access database on a simple
> web form using visual basic.net. ive set up the database as a file
> dsn.
> this is my connection string:
> DBQ=C:\Program Files\Microsoft
> Office\OFFICE11\SAMPLES\Northwind.mdb;DefaultDir=C :\Program
> Files\Microsoft Office\OFFICE11\SAMPLES;Driver={Microsoft Access Driver
> (*.mdb)};DriverId=25;FIL=MS Access;FILEDSN=C:\Program Files\Common
> Files\ODBC\Data
> Sources\test2.dsn;MaxBufferSize=2048;MaxScanRows=8 ;PageTimeout=5;SafeTransactions=0;Threads=3;UID=ad min;UserCommitSync=Yes;
>
> works fine when i try it with a windows form, however with the webform,
> when i try it, i get the following errors because of line69 :
>
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC
> Driver Manager] Driver's SQLSetConnectAttr failed ERROR [HY000]
> [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
> registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
> 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
> Access Driver] Could not use '(unknown)'; file already in use. ERROR
> [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable
> to open registry key 'Temporary (volatile) Jet DSN for process 0x3a4
> Thread 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC
> Microsoft Access Driver]General error Unable to open registry key
> 'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
> 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
> Could not use '(unknown)'; file already in use.
> 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.Odbc.OdbcException: ERROR [HY000]
> [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
> registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
> 0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager]
> Driver's SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC
> Microsoft Access Driver]General error Unable to open registry key
> 'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
> 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
> Could not use '(unknown)'; file already in use. ERROR [HY000]
> [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
> registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
> 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
> Access Driver]General error Unable to open registry key 'Temporary
> (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
> '(unknown)'; file already in use.
> Source Error:
> Line 67: Private Sub Page_Load(ByVal sender As System.Object, ByVal
> e As System.EventArgs) Handles MyBase.Load
> Line 68: DataSet11.Clear()
> Line 69: OdbcDataAdapter1.Fill(DataSet11)
> Line 70: DataGrid1.DataBind()
> Line 71: End Sub
>
> Source File: c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb Line: 69
> Stack Trace:
> [OdbcException: ERROR [HY000] [Microsoft][ODBC Microsoft Access
> Driver]General error Unable to open registry key 'Temporary (volatile)
> Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
> SQLSetConnectAttr failed
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
> '(unknown)'; file already in use.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
> '(unknown)'; file already in use.]
> System.Data.Odbc.OdbcConnection.Open()
> System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
> ConnectionState& originalState)
> System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
> CommandBehavior behavior)
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
> CommandBehavior behavior)
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
> TestWeb1.WebForm1.Page_Load(Object sender, EventArgs e) in
> c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb:69
> System.Web.UI.Control.OnLoad(EventArgs e)
> System.Web.UI.Control.LoadRecursive()
> System.Web.UI.Page.ProcessRequestMain()
>
>
> This is my code:
> Public Class WebForm1
> Inherits System.Web.UI.Page
> #Region " Web Form Designer Generated Code "
> 'This call is required by the Web Form Designer.
> <System.Diagnostics.DebuggerStepThrough()> Private Sub
> InitializeComponent()
> Me.OdbcSelectCommand1 = New System.Data.Odbc.OdbcCommand
> Me.OdbcInsertCommand1 = New System.Data.Odbc.OdbcCommand
> Me.OdbcConnection1 = New System.Data.Odbc.OdbcConnection
> Me.OdbcDataAdapter1 = New System.Data.Odbc.OdbcDataAdapter
> Me.DataSet11 = New TestWeb1.DataSet1
> CType(Me.DataSet11,
> System.ComponentModel.ISupportInitialize).BeginIni t()
> '
> 'OdbcSelectCommand1
> '
> Me.OdbcSelectCommand1.CommandText = "SELECT ShipperID,
> CompanyName, Phone FROM Shippers"
> Me.OdbcSelectCommand1.Connection = Me.OdbcConnection1
> '
> 'OdbcInsertCommand1
> '
> Me.OdbcInsertCommand1.CommandText = "INSERT INTO
> Shippers(CompanyName, Phone) VALUES (?, ?)"
> Me.OdbcInsertCommand1.Connection = Me.OdbcConnection1
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("CompanyName",
> System.Data.Odbc.OdbcType.NVarChar, 40, "CompanyName"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("Phone",
> System.Data.Odbc.OdbcType.NVarChar, 24, "Phone"))
> '
> 'OdbcConnection1
> '
> Me.OdbcConnection1.ConnectionString =
> "PageTimeout=5;MaxScanRows=8;DefaultDir=C:\Program Files\Microsoft
> Office\OFFICE11" & _
> "\SAMPLES;FILEDSN=C:\Program Files\Common Files\ODBC\Data
> Sources\test2.dsn;Drive" & _
> "rId=25;DBQ=C:\Program Files\Microsoft
> Office\OFFICE11\SAMPLES\Northwind.mdb;User" & _
> "CommitSync=Yes;FIL=MS Access;UID=admin;Driver={Microsoft
> Access Driver (*.mdb)};" & _
> "MaxBufferSize=2048;Threads=3;SafeTransactions=0"
> '
> 'OdbcDataAdapter1
> '
> Me.OdbcDataAdapter1.InsertCommand = Me.OdbcInsertCommand1
> Me.OdbcDataAdapter1.SelectCommand = Me.OdbcSelectCommand1
> Me.OdbcDataAdapter1.TableMappings.AddRange(New
> System.Data.Common.DataTableMapping() {New
> System.Data.Common.DataTableMapping("Table", "Shippers", New
> System.Data.Common.DataColumnMapping() {New
> System.Data.Common.DataColumnMapping("ShipperID", "ShipperID"), New
> System.Data.Common.DataColumnMapping("CompanyName", "CompanyName"), New
> System.Data.Common.DataColumnMapping("Phone", "Phone")})})
> '
> 'DataSet11
> '
> Me.DataSet11.DataSetName = "DataSet1"
> Me.DataSet11.Locale = New
> System.Globalization.CultureInfo("en-IE")
> CType(Me.DataSet11,
> System.ComponentModel.ISupportInitialize).EndInit( )
> End Sub
> Protected WithEvents OdbcSelectCommand1 As
> System.Data.Odbc.OdbcCommand
> Protected WithEvents OdbcInsertCommand1 As
> System.Data.Odbc.OdbcCommand
> Protected WithEvents OdbcConnection1 As
> System.Data.Odbc.OdbcConnection
> Protected WithEvents OdbcDataAdapter1 As
> System.Data.Odbc.OdbcDataAdapter
> Protected WithEvents DataSet11 As TestWeb1.DataSet1
> Protected WithEvents DataGrid1 As
> System.Web.UI.WebControls.DataGrid
> 'NOTE: The following placeholder declaration is required by the Web
> Form Designer.
> 'Do not delete or move it.
> Private designerPlaceholderDeclaration As System.Object
> Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Init
> 'CODEGEN: This method call is required by the Web Form Designer
> 'Do not modify it using the code editor.
> InitializeComponent()
> End Sub
> #End Region
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> DataSet11.Clear()
> OdbcDataAdapter1.Fill(DataSet11)
> DataGrid1.DataBind()
> End Sub
> End Class
>
> iv been tryin to sort this for a couple of days but am completely at a
> loss as to how to sort this. Can anyone help?
Do you have Office installed on your server?
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."
<somersbar@.yahoo.com> wrote in message
news:1140106859.776998.150120@.z14g2000cwz.googlegr oups.com...
> im trying to get a table from a microsoft access database on a simple
> web form using visual basic.net. ive set up the database as a file
> dsn.
> this is my connection string:
> DBQ=C:\Program Files\Microsoft
> Office\OFFICE11\SAMPLES\Northwind.mdb;DefaultDir=C :\Program
> Files\Microsoft Office\OFFICE11\SAMPLES;Driver={Microsoft Access Driver
> (*.mdb)};DriverId=25;FIL=MS Access;FILEDSN=C:\Program Files\Common
> Files\ODBC\Data
> Sources\test2.dsn;MaxBufferSize=2048;MaxScanRows=8 ;PageTimeout=5;SafeTransactions=0;Threads=3;UID=ad min;UserCommitSync=Yes;
>
> works fine when i try it with a windows form, however with the webform,
> when i try it, i get the following errors because of line69 :
>
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC
> Driver Manager] Driver's SQLSetConnectAttr failed ERROR [HY000]
> [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
> registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
> 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
> Access Driver] Could not use '(unknown)'; file already in use. ERROR
> [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable
> to open registry key 'Temporary (volatile) Jet DSN for process 0x3a4
> Thread 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC
> Microsoft Access Driver]General error Unable to open registry key
> 'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
> 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
> Could not use '(unknown)'; file already in use.
> 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.Odbc.OdbcException: ERROR [HY000]
> [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
> registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
> 0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager]
> Driver's SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC
> Microsoft Access Driver]General error Unable to open registry key
> 'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
> 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
> Could not use '(unknown)'; file already in use. ERROR [HY000]
> [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
> registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
> 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
> Access Driver]General error Unable to open registry key 'Temporary
> (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
> '(unknown)'; file already in use.
> Source Error:
> Line 67: Private Sub Page_Load(ByVal sender As System.Object, ByVal
> e As System.EventArgs) Handles MyBase.Load
> Line 68: DataSet11.Clear()
> Line 69: OdbcDataAdapter1.Fill(DataSet11)
> Line 70: DataGrid1.DataBind()
> Line 71: End Sub
>
> Source File: c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb Line: 69
> Stack Trace:
> [OdbcException: ERROR [HY000] [Microsoft][ODBC Microsoft Access
> Driver]General error Unable to open registry key 'Temporary (volatile)
> Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
> SQLSetConnectAttr failed
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
> '(unknown)'; file already in use.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open registry key 'Temporary (volatile) Jet DSN for process
> 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
> ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
> '(unknown)'; file already in use.]
> System.Data.Odbc.OdbcConnection.Open()
> System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
> ConnectionState& originalState)
> System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
> CommandBehavior behavior)
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
> CommandBehavior behavior)
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
> TestWeb1.WebForm1.Page_Load(Object sender, EventArgs e) in
> c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb:69
> System.Web.UI.Control.OnLoad(EventArgs e)
> System.Web.UI.Control.LoadRecursive()
> System.Web.UI.Page.ProcessRequestMain()
>
>
> This is my code:
> Public Class WebForm1
> Inherits System.Web.UI.Page
> #Region " Web Form Designer Generated Code "
> 'This call is required by the Web Form Designer.
> <System.Diagnostics.DebuggerStepThrough()> Private Sub
> InitializeComponent()
> Me.OdbcSelectCommand1 = New System.Data.Odbc.OdbcCommand
> Me.OdbcInsertCommand1 = New System.Data.Odbc.OdbcCommand
> Me.OdbcConnection1 = New System.Data.Odbc.OdbcConnection
> Me.OdbcDataAdapter1 = New System.Data.Odbc.OdbcDataAdapter
> Me.DataSet11 = New TestWeb1.DataSet1
> CType(Me.DataSet11,
> System.ComponentModel.ISupportInitialize).BeginIni t()
> '
> 'OdbcSelectCommand1
> '
> Me.OdbcSelectCommand1.CommandText = "SELECT ShipperID,
> CompanyName, Phone FROM Shippers"
> Me.OdbcSelectCommand1.Connection = Me.OdbcConnection1
> '
> 'OdbcInsertCommand1
> '
> Me.OdbcInsertCommand1.CommandText = "INSERT INTO
> Shippers(CompanyName, Phone) VALUES (?, ?)"
> Me.OdbcInsertCommand1.Connection = Me.OdbcConnection1
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("CompanyName",
> System.Data.Odbc.OdbcType.NVarChar, 40, "CompanyName"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("Phone",
> System.Data.Odbc.OdbcType.NVarChar, 24, "Phone"))
> '
> 'OdbcConnection1
> '
> Me.OdbcConnection1.ConnectionString =
> "PageTimeout=5;MaxScanRows=8;DefaultDir=C:\Program Files\Microsoft
> Office\OFFICE11" & _
> "\SAMPLES;FILEDSN=C:\Program Files\Common Files\ODBC\Data
> Sources\test2.dsn;Drive" & _
> "rId=25;DBQ=C:\Program Files\Microsoft
> Office\OFFICE11\SAMPLES\Northwind.mdb;User" & _
> "CommitSync=Yes;FIL=MS Access;UID=admin;Driver={Microsoft
> Access Driver (*.mdb)};" & _
> "MaxBufferSize=2048;Threads=3;SafeTransactions=0"
> '
> 'OdbcDataAdapter1
> '
> Me.OdbcDataAdapter1.InsertCommand = Me.OdbcInsertCommand1
> Me.OdbcDataAdapter1.SelectCommand = Me.OdbcSelectCommand1
> Me.OdbcDataAdapter1.TableMappings.AddRange(New
> System.Data.Common.DataTableMapping() {New
> System.Data.Common.DataTableMapping("Table", "Shippers", New
> System.Data.Common.DataColumnMapping() {New
> System.Data.Common.DataColumnMapping("ShipperID", "ShipperID"), New
> System.Data.Common.DataColumnMapping("CompanyName", "CompanyName"), New
> System.Data.Common.DataColumnMapping("Phone", "Phone")})})
> '
> 'DataSet11
> '
> Me.DataSet11.DataSetName = "DataSet1"
> Me.DataSet11.Locale = New
> System.Globalization.CultureInfo("en-IE")
> CType(Me.DataSet11,
> System.ComponentModel.ISupportInitialize).EndInit( )
> End Sub
> Protected WithEvents OdbcSelectCommand1 As
> System.Data.Odbc.OdbcCommand
> Protected WithEvents OdbcInsertCommand1 As
> System.Data.Odbc.OdbcCommand
> Protected WithEvents OdbcConnection1 As
> System.Data.Odbc.OdbcConnection
> Protected WithEvents OdbcDataAdapter1 As
> System.Data.Odbc.OdbcDataAdapter
> Protected WithEvents DataSet11 As TestWeb1.DataSet1
> Protected WithEvents DataGrid1 As
> System.Web.UI.WebControls.DataGrid
> 'NOTE: The following placeholder declaration is required by the Web
> Form Designer.
> 'Do not delete or move it.
> Private designerPlaceholderDeclaration As System.Object
> Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Init
> 'CODEGEN: This method call is required by the Web Form Designer
> 'Do not modify it using the code editor.
> InitializeComponent()
> End Sub
> #End Region
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> DataSet11.Clear()
> OdbcDataAdapter1.Fill(DataSet11)
> DataGrid1.DataBind()
> End Sub
> End Class
>
> iv been tryin to sort this for a couple of days but am completely at a
> loss as to how to sort this. Can anyone help?