|
Better to have a div with a progressbar image, show it from javascript when your page starts loading and hide it after the page got loaded, even you dont need to hide it because after gettting the response from server it'll overridden..
|
|
|
|
|
When i used to upload the excel file, i inserts the records but it used to skip the insertion, like my file has 9000 records it insert 8890 or 8800 sometimes 8950, plz suggest what would be the possible reason.
Dim conexcel As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("upload/" & FileUpload1.FileName) & "; Extended Properties=Excel 8.0")
Dim cmd As New OleDbCommand("select * from [Sheet1$]", conexcel)
Try
If ConnectionState.Open Then
conexcel.Close()
End If
conexcel.Open()
Dim dr As OleDbDataReader
dr = cmd.ExecuteReader()
Dim act, cnt, ds, cf, co, distt, dtype As String
act = ddl_Activity.SelectedItem.Text.ToString()
cnt = ddl_Center.SelectedItem.Text.ToString()
ds = ddl_DataSource.SelectedItem.Text.ToString()
distt = ddl_Distt.SelectedItem.Text.ToString()
bcode = UCase(bcode) & "/" & distt & "/" & act & "/" & bno.ToString()
dtype = ddl_DataType.SelectedItem.Text.ToString()
Try
Dim name, cnt1, cnt2 As String
name = ""
cnt1 = ""
cnt2 = ""
cf = ""
co = ""
Dim m, p As Int64
m = 1
While (dr.Read())
name = Trim(dr(0).ToString())
cnt1 = Trim(dr(1).ToString())
cnt2 = Trim(dr(2).ToString())
cf = Trim(dr(3).ToString())
co = Trim(dr(4).ToString())
Dim str As String
If cnt1 <> "" Or name <> "" Then
str = "insert into tbl_edu_dt(full_name,contact1,contact2,Activity,Center,DistName,DataSource,Collected_From,Collected_On,batch_code,batch_id,imp_date,imp_time,Data_Type) values ('" & name & "','" & cnt1 & "','" & cnt2 & "','" & act & "','" & cnt & "','" & distt & "','" & ds & "','" & cf & "' , '" & co & "','" & bcode & "','" & m & "','" & Format(Now(), "dd/MM/yyyy") & "','" & imp_time & "','" + dtype + "')"
ObjClass.execute_query(str)
m = m + 1
End If
End While
Catch ex As Exception
End Try
conexcel.Close()
File.Delete(Server.MapPath("~/Upload/" + FileUpload1.FileName))
Catch ex As Exception
Response.Write(ex)
End Try
|
|
|
|
|
If you don't check for any errors, you'll never know...
|
|
|
|
|
Its fine but i m not so free that i will post the problem without checking it. If u dont know the solution why give this kind of posts.
|
|
|
|
|
Looking at your code, you never check for an error after the insert statement. Chances are that you have some illegal values in your input records, and checking for errors would tell you the rows on which it happens.
Just stepping over the insert statement will bring you nothing.
|
|
|
|
|
yogesh_kumar_agarwal wrote: like my file has 9000 records it insert 8890 or 8800 sometimes 8950,
With the same file or multiple file ? I guess it may be causing of exception during the insert records.
What is my suggestion is, Just do a quick comparison with the insrted data and the orginal data. You will easily identify the records which are not inserted. Now check what goes those records.
Hope you got my point.
Thanks !
|
|
|
|
|
This happens in the same file, u overcome the problem i try it to do upload the records using code also with the bearkpoint at catch but it will never come over that.
Also when it inserts 8890 records then abviousally it inserts those records also that it skips when it inserts only 8800.
So i just can't undersatnd the problem why it skips the inserts.
Plz help!!
Thanks
Yogesh Agarwal
|
|
|
|
|
No, Here is my one doubt. You are saying you have 900 records in file and when you inserted the in DB the records comes to 890 ( Let Say ). So there is missing of 10 Recrods. Did you try to identify which records are not inserted ? If yes what is the different between the data which are inserted or which not ? Is there any problem with special char. with in the data ?
|
|
|
|
|
If you program doesn't raise an exception now, adding a try/catch block won't help.
You should lookup the functionality of execute_query(str) statement, and see if it returns any error codes or messages.
|
|
|
|
|
There's a lot of string concatenation with the insert statement, are you sure that none of your records in the file contain additional '?
Is it possible that ObjClass is swallowing exceptions as well?
Also, are you certain the missing datalines aren't missing values for >cnt1 and name?
|
|
|
|
|
Hi all,
i am using capicom.dll for encrypting and decrypting for the digital signature's
i have configured a seperate pool for my application having separate windows user as identity and the authenticate mode is kept to anonymous
the problem here is the authentication is set to windows and that to my user(local domain user) its working fine.
but if its set to that application pools identity
i am getting the following error
5/10/2010 3:31:53 PM
Message : The requested operation is not supported in this platform.
Source :
Stack Trace : at Interop.CAPICOM.EncryptedDataClass.Encrypt(CAPICOM_ENCODING_TYPE EncodingType)
at testing.app.Cryptography.Cryptography.Encrypt(String strpwd)
may i know what permission need to be given and to where.
thanks in advance.
|
|
|
|
|
Since you say that you're using for digital signatures, the signing process will use the user's signing certificate. The application pool user has no signing certificate, hence cannot sign anything. Try using impersonation.
|
|
|
|
|
Mr Michael,
Thanks for your kind reply.
Actually i am not using any certification kind of thing.its just a password(Digital signature) of which i am just encrypting and decrypting. its working if i use my local logged in domain user.but if i use that separately created user i am getting error.
|
|
|
|
|
Hema Bairavan wrote: i have configured a seperate pool for my application having separate windows user as identity
What permission does that user have ? You may try with "Local System" Identity of application pool.
|
|
|
|
|
Mr Abhijit,
Thanks for your kind reply.
it's working fine if i use the local logged in domain user there it's working fine
My requirement is that to connect a sql db via windows authentication.
so in the application pool i set the identity as that newly created domain user and the authentication is set to anonymous.so while connecting to the database it will connect using that domain user.
the permission for that user is , its an domain user. it has been given permission for read.write for the application folder.
Am i missing anything.?
|
|
|
|
|
Hi,
I want to fetch orkut's friends list for one of my web application in asp.net.
href="http://www.orkut.com/social/rest/people/userID/@friends
While looking net i found that we need to make a web request to above url.
But i dont know how to make authorized request using OAuth.
Can anybody share any code either in c#.net or any other language for the same?
Thanx,
s.a.w.
|
|
|
|
|
The HttpWebRequest and HttpWebResponse classes are use to request and respone for any web request. The Httprequest object identifies the Web page and GetResponse() method for obtaining a HttpWebResponse object.
You just need to search on google based on the keyword I have mentioned, you will get your answer
Let me know if you have any issue after that.
|
|
|
|
|
I know how to make WebRequest through asp.net code. I question is specific to webrequest to orkut in order to get the friends list.
For this OAuth libraries classes have to be used and a token is to be generated. I just don't now exactly which classes and methods of OAuth library are to be used.
s.a.w.
|
|
|
|
|
|
Hi all,
1)How to send message through asp.net application ?
2) Will it cost anything to me.. i want free service to send message if possible
Thanks and regards,
Amit Patel
|
|
|
|
|
|
|
hi all i am working on a cms project.I want a editor where i can place my
content easily along with image also.ajax editor have no such tool for uplaoding image along with text.can anybody guide me plz.thanks....
|
|
|
|
|
|
Try FCKEditor.
This is the one (Freeware) i liked the most.
|
|
|
|