|
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 )
|
|
|
|
|
there z no error, but event is not firing.. !!!
|
|
|
|
|
I believe it's meant to be all lowercase
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 )
|
|
|
|
|
what all i tried is.
txtC.setAttribute("onClick","alert('Ok')");
txtC.setAttribute("onclick","alert('Ok')");
txtC.setAttribute("onClick", "javascript:alert(this.id);");
txtC.setAttribute("onclick", "javascript:alert(this.id);");
txtC.onClick = "javascript:alert(this.id);";
txtC.onclick = "javascript:alert(this.id);";
txtC.onclick = "javascript:alert('Ok');";
|
|
|
|
|
Has to use event handler ...
txtC.onclick=doSomething;
function doSomething(e) {
alert('Ok');
}
.....
|
|
|
|
|
Thanks You So much my lovely GUY...
Its Worked...
Great work.. Dear...
i used ...
txtC.onclick = function(){ImageId(this.id);};
function ImageId(i)
{
alert(i);
}
|
|
|
|
|
Cheers
.....
|
|
|
|