|
The Problem is when im importing the .csv/.xls file from the client machine(i.e the Browser's machine). It showing the "Unspecified Error" I Cant Understand Why ?
If got some idea regarding this reply me.
With Warm Regards
Sathish.C
|
|
|
|
|
I'm sorry. It's plain this task is beyond you and you should just give up. Certainly asking again as you did, under a new account, is very rude.
For the third time. The file is on the client. It's not on the server. That is your error. You have the file as a byte stream, so you need to save it to the server, and then use that path ( which, unlike the path you're using, will be valid on the server ) to load the file in Excel.
I'm sorry, even if you get past this, I'd say you need to abandon the work you're doing and read some books on ASP.NET, to get you some basic understanding so you're able to understand clear help when it's offered to you. And, you need to learn some manners too. Creating a new thread, with a new account, when someone is trying to help you on the thread just below it, is just plain rude. I'm sure you have a job that you're incapable of doing, and you're feeling the pressure because you're inadequately prepared for the task at hand. But, this is not our problem. I have stuck with this because I am trying to help you, but I did this despite the way you presented yourself, not because of it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
This is not a new account.
My name is Sathish Im working as a software Trainee.
The Message which is posted in the morning is my Colleague BalaGuru.
We Both are doing this application.
I ve Created this account 3 Months before.
Just now i came to know about the Message Board in this Site.
That's Why i posted my query.
Im just the beginner.
I dont want to cheat anyone.
With Warm Regards
Sathish.C
|
|
|
|
|
Whatever - it seems odd to me that he posted, I answered, then you posted the same thing. Either way, I hope between you, you've managed to understand my explanation, I really would recommend you both do some reading, because the basic nature of ASP.NET seems to have escaped you.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How can two people working together not have communicated to each other that they were both posting the same question on the same forum, sounds strange to me.
Anyway there are plenty of tutorials out there and like Graus said a book one probably be useful for you to understand the basics of asp.net works.
|
|
|
|
|
|
It's the thread right under this one.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Sathish Chakrapani wrote: "Unspecified Error" I Cant Understand Why ?
Because .NET requires you use a batch file to import. Don't forget to call System.Batch.File.Run.ReallyRun.LikeNow("foo.bat"); .
|
|
|
|
|
Hi Friends...
I am importing data from excel file to a datagrid.I use the following code to do that.But i get "Unspecified error" when i open the oledb connection.Wat could be the problem.Someone help in this regard...The code is given below...
Private Sub btnClick_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClick.Click
Try
Dim filepath As String = System.IO.Path.GetFullPath(Me.FindFile.PostedFile.FileName)
GrdExcel.DataSource = GetExcelData(filepath)
GrdExcel.DataBind()
Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub
Private Function GetExcelData(ByVal strpath As String) As DataSet
Try
Dim ExcelConnection As String = ""
ExcelConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & strpath & ";" & "Extended Properties=""Excel 8.0;HDR=Yes"""
Dim strExcelConn As String = ExcelConnection
Dim dbConn As New Data.OleDb.OleDbConnection(strExcelConn)
Dim strSQL As String
Dim delimeter As Char() = {"\"}
Dim splitter As String() = strpath.Split(delimeter)
Dim file As String = splitter(splitter.Length - 1)
strSQL = "SELECT * FROM [" & file & "$]"
dbConn.Open()
Dim cmd As New Data.OleDb.OleDbCommand(strSQL, dbConn)
Dim dsExcel As New DataSet
Dim daExcel As New Data.OleDb.OleDbDataAdapter(cmd)
daExcel.Fill(dsExcel)
dbConn.Close()
Return dsExcel
Catch ex As Exception
Response.Write(ex.Message)
End Try
End Function
Balaguru
|
|
|
|
|
The problem is you don't understand what ASP.NET is, at all.
You get a filepath from your client, then you try to read the file on the server. Unless the server and client are the same machine, that isn't going to work, the file just isn't there.
SAve the file to the server file system in order to read it. Of course, this presents it's own problems, if you have more than one user at once and the file names clash, you'll be in trouble. Use Path.GetTempFileName ( something like that ) to work around that, or just File.Exists when you're saving it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Dear Christian Graus,
Thx for ur reply..The thing is..the .csv/excel file resides only in the client machine.The user has to select the .csv/excel file from his machine and then click the load button in order to get it in a datagrid and finally post it to the database server.
Regards,
Balaguru
|
|
|
|
|
That's obvious. But, you're trying to read the file using the client side path, instead of writing it to the server.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I would like to use the BarcodeGenerator Class, located in the Microsoft.Office.RecordsManagement.PolicyFeatures namespace. I do not have this class, presumably because I do not have the microsoft.office.policy.barcode.generator.dll.
Does anyone one know what software this .dll comes with? I am running Office 2007 Enterprise and Visual Studio 2005 Professional.
Thanks in advance for any help you can offer.
Anubhava Dimri
919250168195
|
|
|
|
|
There's a class for generating barcodes right here on codeproject.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Google is broken where you live ? Sites like Amazon don't work ? Surely you can get this list by looking at existing sites ? If you're going to support cards, the card you can support will be in the docs of your payment gateway
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi,
i want receive mail;
already i have send mail using smtp;its work well;
it's my concepts :but my problem how to receive mail;if i will run my programme then i will check user name and pwd;then goes to next page;when i will search ;who's send msg;and any body want receive my mail;then draft;
how to write a code;if use ant database;
pl help me
any codes and url path
|
|
|
|
|
Member 4546507 wrote: ;if use ant database;
What does this mean ?
There's an article on this very site on writing a POP3 server.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
This is by far the most badly written post.
Please explain so we can understand you
|
|
|
|
|
hi..
i'm creating textboxes and imgebttn dynamically inside a table using javascript. i set some properties for the textboxes. but how can i bind 'onclick' events to the button. The code i used is below.
//for textbox
var txtA=document.createElement("input");
txtA.type = 'text';
txtA.id ='a'+lastrowIndex;
txtA.name ='a'+lastrowIndex;
txtA.className='textbox';
txtA.readonly='readonly';
//for imgbtn
var txtC=document.createElement("img");
txtC.id ='c'+lastrowIndex;
txtC.name ='c'+lastrowIndex;
txtC.className='images_del';
txtC.src="Images/delete_16x16.gif";
// txtC.setAttribute("onClick","alert('Ok')");//this is not working
Thanks in advance.
|
|
|
|
|
use the following
txtC.Attributes.Add("onClick",
"javascript:alert('Ok')");
.....
|
|
|
|
|
i want to bind the event, when its created.. not in the pageload. bcose its creating dyn using javascript...
|
|
|
|
|
SamRST wrote: // txtC.setAttribute("onClick","alert('Ok')");//this is not working
Chage it...
txtC.onClick = function MyClick()<br />
{alert('Ok');}
Hi,
Hope u ll get it.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
modified on Friday, May 9, 2008 1:38 AM
|
|
|
|
|
i cannot do this in pageload event, bcose i'm creating adding this control dynamic (no page reloading).
|
|
|
|
|
What's wrong with txtC.onclick = "alert('OK');" ???
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|