|
I don't use any anti virus software, I us a disk image that I can dynamically add to, so any time I get a virus or anything of that sort, I just reinstall off of my image...takes about 5 minutes.
It almost seems that VS somehow gives .NET processes a boost or something...I'm not sure. It's very strange, but the rate of speed is drastically different when not running VS, so much so that I think it would almost make the program unusable unless VS was running in the background the entire time...The tool is a data transfer program for SQLServer 2005. On average with VS running, it transfers roughly 150 records per second...when i shut VS down, the rate drops to roughly 20 records per second.
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
Hmmm I figured it out...It is because with VS open I also have a live connection to my database...if i leave my connection open instead of closing it each time i have finished transferring data i don't have this issue. seems a little strange considering connection pooling is supposed to help with this, but apparently doesn't help all that much.
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
Generally speaking, when using databases it is always faster to have as few separate calls and as few separate connections to the db as possible. Don't know why, but so I hear, and so I have experienced myself.
Good to hear your problem was solved
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi, Can anyone give me an example to create new field to table in Ms Access with VB.NET?
Socheat
................
|
|
|
|
|
|
I have tried already, but not found.
Socheat
................
|
|
|
|
|
While I understand how to use a for next loop, I cannot work the integer (eg. 1 to 10) into the name of an object. For instance, I would like to create a for next loop for the following code
ckfld1.Checked = False
ckfld2.Checked = False
ckfld3.Checked = False
ckfld4.Checked = False
ckfld5.Checked = False
ckfld6.Checked = False
ckfld7.Checked = False
ckfld8.Checked = False
ckfld9.Checked = False
ckfld10.Checked = False
Could someone show me how to do this?
I tried the following but it does not work.
For x As Integer = 1 To 10
dim c as new checkbox
c.name = "ckfld" & x
c.checked = false
Next
Any help is appreciated. I am using vs 2005.
Thanks
Marc
-- modified at 23:05 Monday 11th June, 2007
|
|
|
|
|
Try this instead:
For Each Box As CheckBox In Me.Controls
Box.Checked = True
Next
This finds all CheckBoxes in your form and checks them. You can also do the same using a Panel or GroupBox.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
The problem is that there will be checkboxes that should not be affected by the for next loop, which is why I was trying to accomplish this the other way.
Is it possible to do it the other way?
|
|
|
|
|
In that case you would put the CheckBoxes you do want to be checked in a Panel.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Firstly you have many checkboxes....I want to know whether you have maintained the same convention while naming your checkbox control....i.e ckfld1,ckfld2,ckfld3,ckfld4...????
If a specific set of checkboxes are to be unchecked then matrixcoder has rightly said to put your checkboxes in a Panel.Then you can write
For Each ctrl As Control In Panel1.Controls<br />
CType(ctrl,CheckBox).Checked=False<br />
Next
Other wise you have to Split the ID of your checkboxes to have the number....you can use Substring method of string Class to do that. After that you can use that number in a For-Each loop to uncheck your CheckBoxes.But it should be a second choice I think.
Tirtha
Do not go where the path may lead, go instead where there is no path and leave a trail.
Author: Ralph Waldo Emerson (1803-82), American writer, philosopher, poet, essayist
|
|
|
|
|
Do you actually need to loop through the same set of chkboxes, the exact same set each time or is it a random selection?
Private Sub TextBox29_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextBox29.Validating
Dim Box26 As Double = 0
Dim Box29 As Double = 0
TextBox29.SelectAll()
Dim response As MsgBoxResult
If TextBox29.Text.Length = 0 Then
MsgBox(("A 'B5' value is required." & vbCrLf & _
"Would you like to add more input"), MsgBoxStyle.YesNo)
If response = MsgBoxResult.Yes Then
e.Cancel = True
Else
e.Cancel = False
TextBox28.Text = 0
TextBox31.Text = 0
TextBox32.Focus()
End If
ElseIf Not IsNumeric(TextBox29.Text) Then
MsgBox("This 'B5' value is not numeric.", MsgBoxStyle.Exclamation)
e.Cancel = True
ElseIf CheckBox10.Checked Then
e.Cancel = False
Else
Box26 = CDbl(TextBox26.Text)
Box29 = CDbl(TextBox29.Text)
TextBox27.Text = CStr(Box29 + 1)
TextBox28.Text = CStr(Box26 - Box29)
End If
'If Box29 <= 0 Then
' MsgBox("Your 'B5' value must be greater than zero.", MsgBoxStyle.Exclamation)
' e.Cancel = True
'End If
TextBox35.Clear()
TextBox36.Clear()
TextBox37.Clear()
TextBox38.Clear()
TextBox39.Clear()
End Sub
Notice above:
ElseIf CheckBox10.Checked Then
e.Cancel = False
I have a total of 10 chkboxes and I will check them at complete random depending on the current scenario, and the scenarios are never the same. Later down in the code I just turn off all chkboxes but I could program only certain ones if needed. This is a NOOBs rendition.
Private Sub TextBox39_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextBox39.Validating
Dim Box35 As Double = (TextBox35.Text)
Dim Box36 As Double = (TextBox36.Text)
Dim Box37 As Double = (TextBox37.Text)
Dim Box38 As Double = (TextBox38.Text)
TextBox39.Text = CStr((Box35 + Box36) + (Box37 - Box38))
If CheckBox1.Checked Then
TextBox4.Text = TextBox39.Text
TextBox8.Focus()
End If
If CheckBox2.Checked Then
TextBox7.Text = TextBox39.Text
TextBox11.Focus()
End If
If CheckBox3.Checked Then
TextBox10.Text = TextBox39.Text
TextBox14.Focus()
End If
If CheckBox4.Checked Then
TextBox13.Text = TextBox39.Text
TextBox17.Focus()
End If
If CheckBox5.Checked Then
TextBox16.Text = TextBox39.Text
TextBox20.Focus()
End If
If CheckBox6.Checked Then
TextBox19.Text = TextBox39.Text
TextBox23.Focus()
End If
If CheckBox7.Checked Then
TextBox22.Text = TextBox39.Text
TextBox26.Focus()
End If
If CheckBox8.Checked Then
TextBox25.Text = TextBox39.Text
TextBox29.Focus()
End If
If CheckBox9.Checked Then
TextBox28.Text = TextBox39.Text
TextBox30.Focus()
End If
If CheckBox10.Checked Then
TextBox31.Text = TextBox39.Text
TextBox32.Focus()
End If
CheckBox1.Checked = False
CheckBox2.Checked = False
CheckBox3.Checked = False
CheckBox4.Checked = False
CheckBox5.Checked = False
CheckBox6.Checked = False
CheckBox7.Checked = False
CheckBox8.Checked = False
CheckBox9.Checked = False
CheckBox10.Checked = False
TextBox35.Visible = False
Label35.Visible = False
TextBox36.Visible = False
Label36.Visible = False
TextBox37.Visible = False
Label37.Visible = False
TextBox38.Visible = False
Label38.Visible = False
TextBox39.Visible = False
Label39.Visible = False
End Sub
I have no naming conventions in my first project here and I am sure there are much better ways of doing my project but its my first attempt with minimal help. YES I unchecked all chkboxes but can code only ones needed at any point in the code blocks. If...Then or If...Then...Else statemants can do your work too to handle different scenarios, of course we do not know exactly what you are working on here.
Remember, I am a NOOB.
Training, http://msdn2.microsoft.com/en-us/library/system.windows.forms.checkbox.checked(VS.80).aspx
|
|
|
|
|
What you are doing is creating another object that does not have the same name, checked value, any of the information that the checkbox already on the form has. What you should do is loop through all the controls of the form and then check the name to the naming convention you use. Check to see if the last number is the correct number, and if so you should set the appropriate check value for that object.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Dear Sir / Madam
I have created a VB .NET 2005 project with 2 Forms.
Form1 has a Panel1 which is an empty Panel1.
Form2 has a Panel2 with 34 buttons inside this Panel2.
Now i'm stuck on one problem!
Here is the explonation of my application...
1) The application loads up and calls Form1
2) On Form1 I click a button to call Form2
3) Form2 loads up (which is a form with Panel2 and 34 buttons inside this
Panel2)
4) Now when I click on any of these buttons inside the Panel2 (such as
Button1, Button2, Button3 etc...), I want to create a new button and
palce it inside the Panel1 with the AddressOf whatever button I may
click.
E.g. Button1.click -> create new Button -> AddressOf -> Button1.click
If anyone could help me on this by showing with a sample of source code it would be very greatful to me.
I'm a student and very new to VB .NET programming.
I'm looking forward to hear from you.
Kind regards
Roni
|
|
|
|
|
since you already know about addressof, then take it further and use a delegate. pass a delegate to form2 and invoke it back on form1 and create the button calling some routine in form1 to do so...
|
|
|
|
|
isn't this the same question you have asked several times and been told the answer?
______________________
stuff + cats = awesome
|
|
|
|
|
http://msdn2.microsoft.com/en-us/library/system.windows.forms.form(VS.71).aspx
This may get you started, I thought I saw your answer a few days ago but this is all that I could find NOW.
|
|
|
|
|
Hi.
I have a SSIS package named TESTPACKAGE on the 2005 SQL Server.
How I can exeucte it from VB.NET?
I found some articels that refer to Microsoft.SQLServer assembly but I use older .NET Framework version (1.1) and this assembly is not availabe for me in Visual Studio (2003).
I read something about DTEXEC command. Can I use it in the Stored Procedure to run SSIS. I used this code in the Stored Procedure to run DTS package on the previsous/older SQL Server version.
<br />
CREATE PROCEDURE dbo.exportData AS<br />
Exec master..xp_cmdshell <br />
'DTSRUN /SMYSERVER /NTESTDTS /Umyaccess /Pmypassword'<br />
GO
Thank you,
|
|
|
|
|
Don't Cross Post in Multiple Forms.
Regards,
Satips.
|
|
|
|
|
I am working on a program that displays large tiff images and interacts with a database to display attributes on the image. I get a "Parameter is not valid" exception on some of the images. I thought it was a size issue but I can open some tiffs that are greater than 10 MB. I then thought it was a bitonal image issue, but I can open some bitonal images. I don't know what to try next. Could it be combination of file size and format? Any suggestions are greatly apprecated. Thank you in advance.
Andy
Geologist
Casper, WY
|
|
|
|
|
The maximum size of any image in pixels is 32767 by 32767. JPEG compressed TIFF's are also not supported.
|
|
|
|
|
I have checked both of these issues, which do not appear to be the source of the problem. I can open my problem files with other programs but I cannot figure the problem here. It appears to occur when opening larger files (>2 MB) with group 4 compression (I can open smaller files that have group 4 compression). Any further suggestions are greatly appreciated.
Andy Finley
Geologist
|
|
|
|
|
Hi All:
I'm trying to dynamically create a datagrid and fill it with XML data. But I get an "Object reference not set to an instance of an object." error when running it.
See the code below. What am I missing?
<br />
Public Sub CreateDynamicGrid()<br />
<br />
Dim ds As New DataSet<br />
Dim grid As System.Web.UI.WebControls.DataGrid<br />
<br />
Try<br />
'Place the XML information into a dataset<br />
ds.ReadXml("C:\Temp\test.xml")<br />
<br />
'The dataset is used as the data source for our newly created datatrid grid <br />
grid.DataSource = ds<br />
grid.DataBind()<br />
<br />
'grid is added to the PlaceHolder<br />
PlaceHolder.Controls.Add(grid)<br />
<br />
Catch ex As Exception<br />
Response.Write(ex.Message.ToString)<br />
<br />
End Try<br />
<br />
End Sub<br />
Thanks in advance!
|
|
|
|
|
Hi Nicki
Which line is thowing the error? Maybe loose the Try/Catch whilst debugging the problem.
Cheers
Tom
|
|
|
|
|
Hi Tom:
It's this line:
---------------------
grid.DataSource = ds
---------------------
I don't understand how the dataset could be blank. The file I'm pointing to in the ReadXML method has data in it.
|
|
|
|