|
Hello frnds,
there is a problem here, I have a datagrid when i add a new record to the grid and press save button it saves, After saving if i refresh the page the record is saving again - i mean a duplicate record is getting saved in the daatbase after refresh. Can any body help me in this regard
thanx in advance
irsh
|
|
|
|
|
You'll have better results if you post your question in the ASP.NET Forum. Also, I'll tell you that it very much depends on how your code is written wheather or not this will be an easy fix. Post you question and database/datagrid handling code in the ASP.NET Forum for better results to your problem.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I know a little about multi-threading in vb.net
I know that we can execute a procedure on a new thread by using:
<br />
Dim t as New Thread(AddressOf proc)
"proc" should be of the form :
<br />
Sub proc()<br />
'code...<br />
End Sub<br />
Can i make proc a sub with arguments?
like this:
<br />
Sub proc(str as String)<br />
'code...<br />
End Sub<br />
and call proc on a new thread and specify str?
I mean something like:
Dim t as New Thread(AddressOf proc("hello"))
If yes, how?
|
|
|
|
|
Sub that starts a thread can't have arguments.
You should set some kind of property or field before start the thread and use it inside.
|
|
|
|
|
ThreadStart's can't have arguments. Normally, you would put this code into a class, along with some public fields that would represent the parameters for this method you want to start. Then you create and instance of the class, set the fields to the values you need, create your ThreadStart object and point it at the method in your instantiated class, then run it. The method would have to pick up its parameters from the public fields you set in its class.
Public Class MyThreadClass
Public argument1 As Integer
Public Sub MyMethod()
Dim whatever As Integer = argument1
.
. your method code...
.
End Sub
End Class
' Code in your calling class.
Dim mtc As New MyThreadedClass
mtc.argument1 = 30
Dim t As New Thread( AddressOf mtc.MyMethod )
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You could use a delegate then invoke it asynchronously. Delegates can take arguments unlike threads.
|
|
|
|
|
Can you please give me a short example? What is a delegate?
I would apreciate your help.
Thanks in advance
|
|
|
|
|
guys,
im developing a ping plotting app, which will run on a centrallised server & ping a particular URL continuously for checking its availability. now i want to create a browser based I/F for that exe app to view reports & add some remarks against a particular entry. so, the admin shud be able to access it from anywhere for the above ops. please suggest how i cud do that?
DaHacker Loves Hackin!
|
|
|
|
|
This would just be ASP.NET Web project. Nothing special there. You'll need to have IIS or the Personal Web Server running on your machine that'll be serving up the web pages and doing the pinging.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi! All
I'm doing an applicaiton using with vb.net. I need t o convert double bytes Hex string into single byte hex(binary) and send to the server. Anyone would help me how to do in vb.net
thanks in advance
|
|
|
|
|
Convert Double Byte Hex to Single Byte?
Are you talking about converting a UniCode string to ASCII?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello Anybody please help these poor student in india
i want to create a datagird with Adding updating and deleting options in the windows forms with vb.net. If any good persons with good mind to help me please help me
with lot of pary and hope
rajeev
|
|
|
|
|
Hi all,
I am new to vb.net. How can I print a file (txt, doc) without opening the file(send the file to printer and have the printer print it). I have try to search for quite sometimes but most of the code i get is not working or just I do not know how to use it.
Please help me
Thanks you so much.
Regards
Hendrik
|
|
|
|
|
.NET Framework Class Library
PrintDocument Class
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDrawingPrintingPrintDocumentClassTopic.asp
.NET Framework Class Library
PrintDialog Class
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsprintdialogclasstopic.asp
|
|
|
|
|
Hi there,
thank for reply. But, it will not work if i need to print a pdf file. Actually i run a console application, so, is there anyway for me to print the pdf file without the Prindialog box appear.
Thanks
Regards
Hendrik
|
|
|
|
|
OPEN "LPT1" FOR OUTPUT AS #1
PRINT #1, "Hello World!"
CLOSE #1
|
|
|
|
|
Hi,
I've been trying to get more than one checkbox column in VB6's Listview control, but have not succeeded. It does not appear to be possible without a serious amount of messing around.
I have also tried Mabry's List control and FarPoint's List Pro 3, but both do not allow any checkbox columns.
The only control I have found so far that will let me have more than one is FarPoint's Spread, but at US$499 it's a tad pricey just to get some checkboxes...
Alternative listview control suggestions appreciated. Thanks,
|
|
|
|
|
Hi,
I've used vbaccelerator's SGRID 2.0 it's really great, i'm really sad because it doesn't work in .NET
It is very easy to use, just check out the sample and it's all for free with the source!
http://www.vbaccelerator.com/home/VB/Code/Controls/S_Grid_2/S_Grid_2/article.asp[^]
It doesn't support checkboxes, however you can place pictures...check out the demo provided with it and you'll see how you can simulate checkboxes...it's really easy
Good luck
|
|
|
|
|
I have one method (GetRow) on the server (remotable object) that caters hundreds of simultaneous clients requests. How does the remotable object handles all this requests at the same time? Are they queued until one request is done or threads are created for each request? Are methods defined in a remotable object SYNCHRONIZED? Do threads process the same code inside GetRow method at tha same time? I was thinking that if the latter is the case then this is dangerous as data inside the method are arbitrarily changed.
|
|
|
|
|
Unless your remote object is setup using the Singleton pattern, you're creating one copy of the object for each instance of your application. Normally, all your instances are running the same copy of the code, but each has their own data. If multiple instances run the same method at the same time, they are running the same code, but against different data. The processor and operating system handle all the context switching between data sets transparently. There is no way that two instances running the same method at the same time can corrupt each others data. Normally, you don't have to worry about it at all.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
When I read data from Excel file using OLEDB, the reader skip the first row, even when I put "HDR=No".
The exception that I catched is "Could not find installable ISAM."
Seem that I did not use something for that connections.
Please help me.
Thank you very much.
|
|
|
|
|
You're getting the "Could not find installable ISAM" message because you're trying to set a Provider specific option, "HDR", and not doing it correctly. You can check out this[^] list of KB articles on MSDN for more information on the error.
We'd have to see your code to see what's going on with the Reader not picking up the first row of the Excel sheet.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you.
Below is my code:
Dim strCnnStr As String = "provider=Microsoft.Jet.OLEDB.4.0; " & _<br />
"data source=" & dlgExcelFile.FileName & "; " & _<br />
"Extended Properties=Excel 8.0;HDR=No"<br />
Dim myAdapter As New OleDb.OleDbDataAdapter("select * from [Sheet1$]", strCnnStr)<br />
Dim myDS As New DataSet<br />
myAdapter.Fill(myDS)
|
|
|
|
|
I am a project manager in ALI Soft. We are facing a problem. we have two project x and y. we want to call a form that is in project x from project y. is it posible? please replay me as soon as posible and get a softcopy on VB Dot net book free.
|
|
|
|
|