Dear all,
I used OdbcCommand.ExecuteNonQuery to run a insert query and it worked. However, the return value of this command is -1, even though thousands of rows inserted into the table already.
From the dynamic help of OdbcCommand.ExecuteNonQuery:
"For UPDATE, INSERT, and DELETE statements...
Reply to cjard's answer - 2
Thank you so much for the detail answers. Now I totally understand what you said. Thanks again:)
Regarding whether to split the table or not, after reading your answers, I agree with you that we may not need to split table. If one year we have around 30,000 rows...
Reply to cjard's answer
Thanks for your answers, cjard. It is very helpful.
I will use your "union all with SQL" strategy. The database I am using is IBM DB2. There are several indices built on the table "lookup_data", according to your strategy I will build the same indices on the table...
Dear all,
I have a VB.Net application, which allows users to enter lots of data into a event table. Now the table is not larger. But later on it will become a huge table. My project now is creating a exactly same table as the current event table, and we will move more than 2-year-old data from...
tg, here is what I did as you suggested:
Module Module1
Public sum As Integer
Public Sub Main(ByVal args() As String)
Dim sum As Integer
For i As Integer = 0 To UBound(args)
sum += CInt(args(i))
Console.WriteLine(args(i))
Next
MsgBox(sum.ToString)
Dim MyForm As Form1 = New Form1(sum)...
Thanks a lot, tg. I works great now.
One thing I am confused is that variable "sum" is a global variable, and my project runs from "Sub Main(args())", which assigns value to "sum". How could not Form1_load not get the value of "sum"? Theoretically, could you please explain to me? Thank you...
My code is:
Module Module1
Public sum As Integer
Public Sub Main(ByVal args() As String)
Dim sum As Integer
For i As Integer = 0 To UBound(args)
sum += CInt(args(i))
Console.WriteLine(args(i))
Next
MsgBox(sum.ToString)
Dim MyForm As Form1 = New Form1
MyForm.ShowDialog()
'...
Thanks for the reminding.
I added code "MsgBox(sum.ToString)" before definig new form1.
if I run :
C:\WinApp2 10 20 30
Result: Messagebox shows 60. But the "sum" in Textbox on the form shows 0.
It seems sum is reinitiated somewhere after.
Dear all,
I created a module and a form in Visual Studio.Net like following:
Module Module1
Public sum AsInteger
PublicSub Main(ByVal args() AsString)
Dim sum AsInteger
For i AsInteger = 0 To UBound(args)
sum += CInt(args(i))
Console.WriteLine(args(i))
Next...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.