|
if u know the answer then help me.
thanks
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Too late - you have been given the answer in the correct forum. It is a pain when people post the same question to multiple forums, and even more so when it is OBVIOUSLY the wrong forum.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Use common sense and don't cross post.
|
|
|
|
|
kissdznuts wrote: Use common sense
I ditto that.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
...
Blog link to be reinstated at a later date.
|
|
|
|
|
I have to develop an server/client application like this:
-database on server
-clients connecting to server, working with that database(as many i want)
I never did something like that so any help will be appreciated, especially some code examples.
I am using vb 2008 professional edition
|
|
|
|
|
AngSoft wrote: I never did something like that
What have you done in vb.net ?
If this is an actual paying job for a customer, I warmly suggest one of the following solutions:
1. Call it off
2. Hire a programmer with the necessary experience to do it for you
3. Take the customer's money, and buy a plane ticket to a country that does not have an extradition agreement with yours.
Otherwise you are going to have to be much more specific.
AngSoft wrote: any help will be appreciated
Help with what exactly ?
AngSoft wrote: especially some code examples
Code examples of what exactly ?
Visual Studio contains help files, which contain plenty of walkthroughs and examples that can help you on your way with database - client application development.
Good luck with it.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Try here
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi All,
I am developing an Application in vb.net 2008
In my application I am using an Thread named 'ThreadSplace', that runs the Splash Screen at the start of the Project and when the MDI is Loaded the Thread is Aborted.
But the Problem is that when the the application run from my exe, at the time of Loading MDI it throws an error :
"Unhandled exception has occurred in Your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, The application will close immediately.
Thread was being abored."
But, I am never understand from where this error throws. Because when I run my application from my Project It works fine.
Please Help me.
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
If you manually stop a thread using the Abort() method, this throws a ThreadAbortException. I guess the exception it thrown where you stop the splash window thread.
|
|
|
|
|
I put Try..Catch block in the places where I am call thread.abort()
But this exception throws where no thry catch block.
I guess when I am intialize the thread at the start of the mdi form such as :
Public Class frmMDIMain
Public TimerShowSplash As New Threading.Thread(AddressOf frmMDIMain.LoadPlashScreen)
Private Sub frmMDIMain_FormClosing(ByVal sender As Object, ByVal e As ..................
may be some how when the MDI form call again then it will hit on Timersplash intialise line. and then the error throws.
So, What will be the solution
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
Calling Abort is not safe. It generates ThreadAbortException and it is not guaranteed that the thread will stop working. See what MSDN says about this exception
MSDN
When a call is made to the Abort method to destroy a thread, the common language runtime throws a ThreadAbortException. ThreadAbortException is a special exception that can be caught, but it will automatically be raised again at the end of the catch block.
This is the reason why your code is crashing. You should consider some safe methods for aborting your thread. Use a volatile boolean variable and if is set, exit from the thread manually.
|
|
|
|
|
How can I Abort a thread or exit from a tread without Threading.thread.exception
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
You can use a flag variable inside the thread code and check it periodically to see if the code should exit.
|
|
|
|
|
Did you see the VS2008 comes with a SplashScreen component?? If you have the application framework enabled in your project, you can add it just like you added a new form. You can even modify the splash screen form however you like.
Just a thought...
|
|
|
|
|
Hi all,
I have one web methode in my web service,that can only get one table from my application and it is without Transaction,
<WebMethod()> _
Public Function OprationONTbl(ByRef ds As Data.DataSet, ByVal TblName As String, ByVal Insert As Boolean, ByVal Update As Boolean, ByVal StrWhere As String, ByVal retValue As Boolean, ByRef StrRetValue As String) As String
Dim cn As New SqlConnection
Dim cmd As New SqlCommand
Dim da As New SqlDataAdapter
Dim cBuilder As New SqlCommandBuilder(da)
Try
'-*-> cn
Dim cls As New clsGeneral
cn.ConnectionString = cls.GetConnection
cls = Nothing
'-*-> cmd
cmd.CommandText = "Select * From " & TblName
If StrWhere.Trim <> "" Then cmd.CommandText = cmd.CommandText & " WHERE " & StrWhere
cmd.Connection = cn
'-*-> da
da.SelectCommand = cmd
'**************************************'
If Not Insert And Not Update Then
da.Fill(ds, TblName)
End If
'**************************************'
If Insert Then
da.InsertCommand = cBuilder.GetInsertCommand
da.Update(ds.Tables(TblName))
If retValue Then
cmd.CommandText = "Select Max(Id) from " & TblName
cn.Open()
StrRetValue = cmd.ExecuteScalar
cn.Close()
End If
End If
'**************************************'
If Update Then
Dim value() As String = StrWhere.Split("*")
cmd.CommandText = "UpDate " & TblName & " SET " & value(1) & " WHERE " & value(0)
cn.Open()
cmd.ExecuteNonQuery()
cn.Close()
End If
Return ""
Catch ex As Exception
Return "OprationONTbl : " & ex.Message
Finally
If cn.State = ConnectionState.Open Then cn.Close()
cn = Nothing
cmd = Nothing
da = Nothing
cBuilder = Nothing
End Try
End Function
Now i want get more table form my application and with transaction, that if i send to webService two tables, with one transaction tow tables be full of data,
now i changed above web method but my result is not true ,i test to many state of this code but it has different Error for Inserting data,
I don't know how i can change this web method for doing my work true.
i write this but it is mistake,
Dim myTblName() As String = TblName.Split("$")
'-*-> cmd
For i As Integer = 0 To myTblName.Length - 1
cmd.CommandText = "Select * From " & myTblName(i)
If StrWhere.Trim <> "" Then cmd.CommandText = cmd.CommandText & " WHERE " & StrWhere
cmd.Connection = cn
'-*-> da
da.SelectCommand = cmd
'**************************************'
If Not Insert And Not Update Then
da.Fill(ds, myTblName(i))
End If
Next
'**************************************'
If Insert Then
Dim trans As SqlTransaction
cn.Open()
trans = cn.BeginTransaction
cmd.Transaction = trans
For i As Integer = 0 To myTblName.Length - 1
da.InsertCommand = cBuilder.GetInsertCommand
da.Update(ds.Tables(myTblName(i)))
If retValue Then
cmd.CommandText = "Select Max(Id) from " & myTblName(i)
StrRetValue = cmd.ExecuteScalar
End If
Next
Try
trans.Commit()
Catch ex As Exception
trans.Rollback()
End Try
End If
'**************************************'
If Update Then
cn.Open()
Dim trans As SqlTransaction
trans = cn.BeginTransaction
cmd.Transaction = trans
For i As Integer = 0 To myTblName.Length - 1
Dim value() As String = StrWhere.Split("*")
cmd.CommandText = "UpDate " & myTblName(i) & " SET " & value(1) & " WHERE " & value(0)
cmd.ExecuteNonQuery()
Next
Try
trans.Commit()
Catch ex As Exception
trans.Rollback()
End Try
End If
Return ""
Catch ex As Exception
Return "OprationONTbl : " & ex.Message
Finally
If cn.State = ConnectionState.Open Then cn.Close()
cn = Nothing
cmd = Nothing
da = Nothing
cBuilder = Nothing
End Try
End Function
i need your help,
Thank You
<div class="ForumSig">Hoda </div>
|
|
|
|
|
Don't use Max(Id) and a transaction to get the id, just call "select scope_identity()" after you have made the insert. That is the normal method to get the id, and it will use less resources on the server.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
How will I remove a textbox during runtime by using linklabel in c# language.
|
|
|
|
|
what do you want to do actually
if you want to remove textbox on click of link label then use following
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked<br />
Me.Controls.Remove(TextBox1)<br />
End Sub
and if you want to off the visiblity of the textbox then do following
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
TextBox1.Visible=False
End Sub
hope this helps
|
|
|
|
|
hitesh.kalra wrote: How will I remove a textbox during runtime by using linklabel in c# language.
And you're asking that in a VB forum?
|
|
|
|
|
when i run my application in debug mode it gives me the following error at startup , i am unable to resolve this issue , please help , thanks in advance .....
An error occurred creating the form. See Exception.InnerException for details. The error is: The type initializer for 'Request_Forms.Main' threw an exception.
hello
|
|
|
|
|
You have a static initialiser (called a shared constructor in VB) that is doing something that isn't working. As the error message sayd "See Exception.InnerException" for details. You haven't provided those details so you might want to have a look see.
|
|
|
|
|
Dear Sir
I have designed 20 textboxes in Form1 and i have set some formulaes for the result.
so i wanted to see the 20 textboxes values and result textboxs values in print preview.
for example
Project Calculation Report No.XXXX Page1
Date:DDMMYYYY
Project:XXXXXXXXXXXXX
input Data
___________________________________________________________
Textbox1 Textbox2 Textbox3 Textbox4
Textbox5 Textbox6 Textbox7 Textbox8
Textbox9 Textbox10 Textbox11 Textbox12
Textbox13 Textbox14 Textbox15 Textbox16
Textbox17 Textbox18 Textbox19 Textbox20
____________________________________________________________
Result
Textbox21 Textbox22 Textbox23 Textbox24
_____________________________________________________________
Kindly Help me
|
|
|
|
|
OK, what are you using to generate this report??
|
|
|
|
|
I dont know,how to do it
can you please advise me ,what i have to use to generate the report
|
|
|
|