|
excellent Abhishek Sur!!
this solves my problem.....
CodeProject rocks !!
|
|
|
|
|
Hi, you can try moving trans.Rollback() and Response.Redirect("NewInc.aspx") to 'finally' block.
modified 27-May-14 5:27am.
|
|
|
|
|
I have written a code to upload data from excel to oracle database in asp.net.This code is working fine on local machine. I have hosted this code
on web server IIS 5.1 using my credentials(OS window XP SP3, so default IIS is 5.1).
Problem :
When I login on the server machine using my login id ,the application runs fine. If I try to run this application from another local machine other
than server(using same my login id) then also there is no problem. But if someone else logs in into a local machine and tried to run the application using his id then it’s not working..
This is my connection string:
OleDbConnection oledbConn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" + "Data Source=" + Label1.Text + ";" + "Extended Properties=Excel 12.0");
The code fails after oledbConn.Open(); when someone else logs in into a local machine
|
|
|
|
|
Naturally, if you told us what label1.Text was, we might have some suggestions.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Label1.Text = FileUpload1.PostedFile.FileName;
containing name and path of excel file
|
|
|
|
|
And this is supposed to find the file using the network, right ? I suspect the issue has to do with the login you're using because it has to do with permission to grab files at random across the network. OR it has to do simply with your login having the right to access files on your computer.
amittinku wrote: Label1
amittinku wrote: FileUpload1
Are you attempting to make your code as hard to read as possible ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I am agreeing that issue is with some permissions.
It is web based application, any one can use it. After accessing the URL from local machine, any user can try to select excel placed in any location on his desktop. So how to do settings on IIS so that any user could do it, not just who configured IIS.
|
|
|
|
|
It's not an IIS issue. It's a network issue. Your current code will only work if you give the server access to all the computers. But you have the file data, why not write it locally and read it from there ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i have not got u completely.
see code is on webseerver. we r calling from any other machine. When local machine try to access webserver, it asks for username and password, but after that does not open excel file.
I did not get "But you have the file data, why not write it locally and read it from there ? "
|
|
|
|
|
I am posting the exact error that i Got at oledbConn.Open();
Exception ex
ex.message returns "C:\Users\vikas_aggarwal01\Desktop\Kapil.xls' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides."
ex.source returns " Microsoft Office Access Database Engine"
The above error comes only when another user tries to do it.
|
|
|
|
|
I tried with different user, I am getting similar error:
The Microsoft Office Access database engine cannot open or write to the file 'C:\Users\Public'. It is already opened exclusively by another user, or you need permission to view and write its data.
|
|
|
|
|
HI All My Friends..
I am trying to implement image in my Addressbar in Browser..
My Code is Below:Its Not working..
|
|
|
|
|
You have to add the .gif link also..!
try this website
http://www.html-kit.com/favicon/-/selpic-1/[^]
I think it should keep it in root folder..!
I use the below cobe to generate Fav Icon....!It may be helpful..!
<link rel="shortcut icon" href="favicon.ico">
<link rel="icon" type="image/gif" href="animated_favicon1.gif">
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
hi everyone
i have a dropdownlist which has more than 60 items.when i click on it its list become so long that my website design looks bad.i want to include scroll bars (vertical scroll bar)in my dropdownlist. Is it possible? if yes than how???? plz help
|
|
|
|
|
No Vertical Scrollers are inbuilt in dropdown.... It will automaticaly generated..
But as far as Horizontal is cocerned i dont think so..
The only Solution you have to fix the width of dropdown or you do this in Silverlight
|
|
|
|
|
but in my situation there is no auto generate scroll bars. U suggest Silverlight plz explain it. Is it like AJAX controls or something else.
thnx again 4 help
|
|
|
|
|
Dear First you tell me on which Architechture your website is??
after that For silverlight you have to Make a Custom Usercontrol of dropdown...
But Vertical Horizontal bars are inbuilt in ASP.net..but for horizontal it cant be posible in ASP.net
Only Solution You Set a width to your Dropdown And you Put only this dropdown in your TR Or TD
|
|
|
|
|
Did You check this link
[^]
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Hi
I have recently installed VS 2005 on my computer. Uninstalled 2003 and installed this.
I am not finding the Data Adapters or Validation Controls in the Toolbox.
I dont the reason why?
Should i try to reinstall VS2005 again and check?
Need your advice?
Thanks
KSR
|
|
|
|
|
First Check the toolbox by right click choose items ..!
I dont think so You will find..!
First Uninstall all and Reinstall..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
I need a list of good dashboards I could use. Or if there is something like that available with Visual Studio version that would be great as well.
|
|
|
|
|
what are you talking about ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Dashboards with Sql Server or Asp.net ..!
Be More Clear ..!
Civic06 wrote: I need a list of good dashboards
If it with SqlServer Google it with Performance Dashboard
You will get lots of dashborads which are available..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
|