|
Fair enough.
It's possible to do with threads, but I'd probably think about managing my own thread pool for this, keeping the number of threads down to the number of processors in the box. I'd even consider "numProcessors - 1" given the length of time this operation takes. This would be to keep the SQL server free to do its work for other clients.
Now, I'm no expert in SSIS for sure. I have precious little experience with it. (I think this question might be geared more for the SQL forum and not the VB.NET forum.) But, from what I've read, I'd probably create a package that works with it's own connection and file, then terminates. A second, "master" package would then launch your VB.NET code, which organizes the files to be imported, manages it's own thread pool, and launches instances of a class that executes the first SSIS package.
|
|
|
|
|
Hi Everyone,
I am writing a vb.net window application. I want to add some rows into datatable.
The problem I am having is when i first add a new row to the datatable, I get very
slow performance (20-30 second delay). The add to datatable works but I
get slow performance. Any record adds or deletes after this first add
are fast. I get slow performance on the first add. I have no idea what
is causing this slow performance. I cannot figure out what is
delaying the add. Any thoughts on where I might be going wrong?
Thanks in advanced.
Here is my codes:-
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
If myTable Is Nothing Then InitGrid()
Dim Row As DataRow
Try
For Each Row In myTable.Rows
If Row.Item("HBarCode").ToString = Me.txtHBarCode.Text Then
MessageBox.Show("Housing Serial Number already scanned.Duplicated.")
txtHBarCode.Focus()
Exit Sub
End If
If Row.Item("EMIBarCode").ToString = Me.txtEMIBarCode.Text Then
MessageBox.Show("EMI Serial Number already scanned.Duplicated.")
txtEMIBarCode.Focus()
Exit Sub
End If
Next
Row = myTable.NewRow()
Me.txtCounter.Text = myTable.Rows.Count + 1
Row.Item("HBarCode") = Me.txtHBarCode.Text
Row.Item("EMIBarCode") = Me.txtEMIBarCode.Text
'to check any colume without data, then only add row at myTable
If Me.txtHBarCode.Text.Trim.Length = 0 Then
MessageBox.Show("Please Scan in Housing BarCode.")
Me.txtHBarCode.Focus()
Exit Sub
End If
If Me.txtEMIBarCode.Text.Trim.Length = 0 Then
MessageBox.Show("Please Scan in EMI BarCode.")
Me.txtEMIBarCode.Focus()
Exit Sub
End If
myTable.Rows.Add(Row)
Me.txtHBarCode.Text = ""
Me.txtEMIBarCode.Text = ""
Me.txtHBarCode.Focus()
If Me.txtCounter.Text = Me.txtQty.Text Then
txtQty.Enabled = False
btnComplete.Enabled = True
txtHBarCode.Enabled = False
txtEMIBarCode.Enabled = False
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
dgResult.Update()
End Sub
Public Sub InitGrid()
myTable = New DataTable("LotNumber")
Dim HBarCode As DataColumn = New DataColumn("HBarCode")
HBarCode.DataType = System.Type.GetType("System.String")
myTable.Columns.Add(HBarCode)
Dim EMIBarCode As DataColumn = New DataColumn("EMIBarCode")
EMIBarCode.DataType = System.Type.GetType("System.String")
myTable.Columns.Add(EMIBarCode)
ds = New DataSet
ds.Tables.Add(myTable)
dgResult.SetDataBinding(ds, "LotNumber")
End Sub
thanks,eunice
|
|
|
|
|
There's nothing in the code you've posted that will do what you describe. You're going to have to step through the code in the Debugger, line-by-line, and step into all methods and functions (F11) to see on what line the code is hanging up. Set a breakpoint on the first line of the button Click event handler code and start from there.
|
|
|
|
|
hi guys
my application is not running under win.2000 though i have made intranet zone fully trusted , though i am not getting any exception on win xp, i am running exe from network path,,
what could be the cause, ?
thansk in advance
....
and second one i have win2000 virtual machine installed on my pc, but in the admin tools,
it doesnt show framework 2 configuration ,, thoug framework 2 is installed also on virtual machine ,,,
thanks again
hello
|
|
|
|
|
hi
First is your application a .net APPLICATION? (MSI)FILE NOT eXE?
And what is the exception that you get when you try to run it in win 2000?
thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
hello frnds,
i want to append one word file to another to anoter how can i do that ?
thankx in advance
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
|
hai all,
can you give me an idea to compress the 'folder' in vb.net.
I wish it is better to not import external dll.
Thank You in Advance
Senthil S
Software Engineer
|
|
|
|
|
DO you want to specifically compress a folder?? Compressing all files in the folder will not work??
[I think you want to zip the folder? Am i right? ]
modified on Wednesday, January 02, 2008 6:05:35 AM
|
|
|
|
|
Hi, Now i create a setup project to deploy my application. Now I know how to create the setup project but I get stuck with deploy a custom folder. I need to place a folder name DbFile in the root drive C:\ but I don't know which properties that I need to set in the properties windows in order to create this folder in the root drive C:\ of the target client when I install my application.
Thank in advance!
|
|
|
|
|
This is a really bad practice so I discourage you from doing it. Any application specific files should be under the app's Program Files folder or under Common Files or the User's Application Data Folder.
But, I also realzie that there are few (very few) circumstances where this is a must. All you have to do is right-click your setup project, click View, then File System. In the File System editor window, right-click the "File System on Target Machine" line and pick Add Special Folder. The in that menu, click on Custom Folder. Rename the folder to whatever you want and in it's DefaultLocation property, change it to "%SYSTEMDRIVE%\"
|
|
|
|
|
|
Dear Sirs,
in our vb.net application we need to show on the form, an e-mail that comes from outlook and it is stored in .msg extension, like the way outlook does. Any idea how to do that? Maybe there is a component that does this ?
ninkk
|
|
|
|
|
You can either use Outlook, through it's automation interface (Outlook Express does NOT have one!), or start Googling around for a third party component to do it. I started searching with "vb.net component .msg file[^]".
|
|
|
|
|
HI all
I have an application in which I am reading a image from a file & loading it into picture box.
I wanted the picture to be stretched in as per the picture box…so set the sizemode property of picture box to stretch
But the image is not stretching..
I have following doubts
- I am using file stream to read the picture. Is that has any thing to do with it?
- I am using that Picture box to allow the user to use as MsPaint and have a bitmap and graphic object associated with it. So am I supposed to close both or any of them before I can load and stretch the image???
Regards
Nishkarsh
|
|
|
|
|
The streams have nothing to do with streching the image.
nishkarsh_k wrote: I wanted the picture to be stretched in as per the picture box…so set the sizemode property of picture box to stretch
Are you expecting the image to strech with a resizing PictureBox?? If the PictureBox isn't anchored to the sides of the form, the image won't resize because the PictureBox isn't resizing.
All you have to do to get it to work is set the Image property to the image you want and change the SizeMode to StrechImage. That's it. If you want something else, you're going to have to describe what you want it to do.
|
|
|
|
|
I had done all that u told but it dose not works only at that place.
At all other places it dose.
The only difference at this place in from other places is that the picture box is placed inside a panel
|
|
|
|
|
hi
can any one tell me how to store & retrive images from Access.
poonam
|
|
|
|
|
|
hi,
i m developing a text editor. I m using Dhtml edit control rather than richtext box control. My problem is, i wana limit the number of lines in dhtmal edit control. that is i want that a user can enter only 20 lines in dhtml edit control. and after than he has to go on the other page for writing further. so is it possible to limit the number of lines in dhtml edit control. Thx in advance...
King
|
|
|
|
|
Nope. There is no property that exposes this. The DHTMLEdit control is design to edit web pages, not Rich or normal Text.
|
|
|
|
|
thx for reply me.
Can u tell me how i can do the same thing in richtext box control that is if the user writes 20 lines then how can i forces him to further write on the next page. plz reply me..... n thx in advance
King
|
|
|
|
|
What "next page"?? You can handle the TextChanged event of the RTB, check to see how many "lines" (hint: Lines property - the RTB defines a line as a bunch of text with an [ENTER] key on the end, NOT the visual lines on the screen!) then do whatever you want when the number gets to 20.
|
|
|
|
|
thx.
i got your point. Now i m facing another problem in RTB. When i use a image in RTB and try to resize it, the resolution of the image destroyed. Can you suggest anything for solving this problem. I m using DHTMLEdit instead of RTB just becuase of image resolution problem. If you have any solution plz tell me thx man...
King
|
|
|
|
|
I am trying to populate a backup Access Table for specific range of dates; however, the whole table is getting backed up. It works fine with other fields (eg. the commented myCmd statement). Any suggestion will be appreciated
Dim sDate, eDate, cmd As String 'starting date and end date
sDate = DateTimePicker1.Value
eDate = DateTimePicker2.Value
Dim ssdate As Date = DateTimePicker1.Value
'******* Start of Nash-Sutcliffe Efficiency Algorithm ********
'------- Populating dailySummary Table -----
myCmd = "SELECT * INTO dailySummary FROM " & inpTable & " WHERE " & fdate & " > " & ssdate
'myCmd = "SELECT * INTO dailySummary FROM " & inpTable & " WHERE " & obsDaily & " BETWEEN 4.0 AND 5.0"
cmmd = New OleDbCommand(myCmd, myConnection)
MsgBox(myCmd)
cmmd.ExecuteScalar()
|
|
|
|