4,901 Posted Topics

Member Avatar for Aviplo

You may be able to use the bulk insert capability. Here ase several links to more information http://msdn.microsoft.com/en-us/library/ms188365.aspx http://www.simple-talk.com/sql/learn-sql-server/bulk-inserts-via-tsql-in-sql-server/ http://blog.sqlauthority.com/2008/02/06/sql-server-import-csv-file-into-sql-server-using-bulk-insert-load-comma-delimited-file-into-sql-server/ I used to do this when speed was a priority. I had to import 8000+ records every five minutes and it all had to be done as one transaction. Doing …

Member Avatar for ExpertMind
0
3K
Member Avatar for jhedonghae
Re: LAN

You have to get your system or database admin to set up the database on the server and assign permissions. If you are going to allow multiple copies of your program to use the database concurrently then you will have to build in some sort of interlock to prevent multiple …

Member Avatar for jhedonghae
0
150
Member Avatar for Reverend Jim

Naturally, I don't notice the typo until just after I commit the post. With the old system, I was able to click "Edit" to immediately correct the typo. Now I must leave the page and return to it to get the Edit option. Also, it seems a little counter intuitive …

Member Avatar for TrustyTony
1
262
Member Avatar for tendaimare

Dim con As New ADODB.Connection con.Open("Driver={Microsoft Access Driver (*.mdb)};Dbq=d:\temp\mydb.mdb;Uid=username;Pwd=password;") con.Execute("delete from myTable where ID=" & txtID.Text) con.Close() That's if ID is numeric. If it is a string then use con.Execute("delete from myTable where ID='" & txtID.Text & "'")

Member Avatar for Reverend Jim
0
221
Member Avatar for jhedonghae

If you are just saving it into the database then you don't need datasets and datatables. But I suggest you use a datetime field instead of separate date and time. To add the login record you can do Dim con As New ADODB.Connection con.Open("Driver={SQL Server};Server=.\SQLEXPRESS;Database=mydb;Trusted_Connection=yes;") Dim query as String = …

Member Avatar for jhedonghae
0
1K
Member Avatar for renzlo

Definitely use the filesystemwatcher. One thing to consider is how files are created in the folder. You may have a problem with timing. For example, if you are watching a folder for *.txt files, the event will be triggered when the file is created, but that doesn't necessarily mean that …

Member Avatar for renzlo
0
210
Member Avatar for Begginnerdev

One suggestion is to declare an array of references to panel and assign the panels to the array in the order you want to reference them. [code] Private panels(2) as Panel panels(0) = myPanel1 panels(1) = myPanel2 panels(2) = myPanel3 [/code]

Member Avatar for Begginnerdev
0
153
Member Avatar for darthswift00

If each record has a primary key that is an auto-incrementing (identity) value then you could compare the field against the field returned by the record with key= MAX(pkID) where pkID is whatever name you are using for your primary key.

Member Avatar for Reverend Jim
0
3K
Member Avatar for Gobble45

If Sheet is a reference to the worksheet in question then Dim row As Integer = 1 Do Until IsNothing(Sheet.Cells(row,1).Value) row += 1 Loop

Member Avatar for Reverend Jim
0
967
Member Avatar for ZainabJuma

If there are no records in the current year then set the ID to year*10000 + 1 otherwise set it to MAX(TraineeID)+1

Member Avatar for poojavb
0
99
Member Avatar for tom12

You can't just post a page of code with no comments and expect us to tell you what is wrong with it. Tell us what it is supposed to do, then tell us what it is actually doing. Any error messages that pop up would be useful to know as …

Member Avatar for Begginnerdev
0
80
Member Avatar for guru_iyer
Member Avatar for Farhan_B

I'm a little rusty on "having" but I think "having" is used with aggregate functions as in "having SUM(field) > value". I think you want to use "where" instead of "having".

Member Avatar for M.Waqas Aslam
0
208
Member Avatar for cs_tx_usa

Binary reads use byte arrays for the container. If you need to store the data as 16 bit values then you have to combine the bytes manually as in [code] Dim bin8() As Byte = System.IO.File.ReadAllBytes("d:\test.txt") Dim bin16((UBound(bin8)) \ 2) As UInt16 Try For i As UInteger = 0 To …

Member Avatar for Reverend Jim
0
454
Member Avatar for networkmancer

I usually keep track of dynamic controls in an array or a collection of some sort. For example Private textboxes As New Dictionary(Of Integer,TextBox) . . . Dim tb As New TextBox tb.Text = "some text" . . . textboxes(textboxes.Count) = tb then you can refer to a specific control …

Member Avatar for Reverend Jim
0
1K
Member Avatar for networkmancer

Try For row As Integer = 0 To ListView1.Items.Count - 1 For col As Integer = 0 To ListView1.Columns.Count - 1 Debug.WriteLine(ListView1.Columns(col).Text & ": " & ListView1.Items(row).SubItems(col).Text) Next Debug.WriteLine("") Next

Member Avatar for Reverend Jim
0
157
Member Avatar for Reverend Jim

Would it be a big deal to add an option to the Search to restrict results to the current forum only? When I am on the VB.net forum, for example, and I do a search, I am interested in results in the VB.Net forum only.

Member Avatar for jbennet
2
312
Member Avatar for BeeKeeper18

One easy way is to use a filter as in [code] Dim alltext() As String = System.IO.File.ReadAllLines(myfilename) Dim filtered() As String = Filter(text, "12345") [/code] You may have to include the field delimiters (commas, perhaps) in the filter string to prevent matches on the ID string if it should happen …

Member Avatar for BeeKeeper18
0
3K
Member Avatar for Farhan_B

What do you mean by [QUOTE]when my saler order takes 5[/QUOTE]Also [QUOTE]project this in my overall amount[/QUOTE] is unclear.

Member Avatar for Reverend Jim
0
149
Member Avatar for huskarit

The idea of event driven systems is to avoid polling/idling loops. Polling/idling uses CPU cycles unnecessarily and slows down anything else that may be running at the same time. One way to avoid this when you need to process several forms in succession and in a specific order is to …

Member Avatar for Reverend Jim
0
4K
Member Avatar for huskarit

Try "\(\d{3}\) \d{3}-\d{4}" for the pattern. That requires a space between the area code and the number. Remove the space if you don't want it.

Member Avatar for Jx_Man
0
184
Member Avatar for João Travassos

You could use the "Lines" property to access each line individually, then check if the line can be converted to a number as in [code] For Each line As String in RichTextBox1.Lines() If IsNumeric(line) Then sum += Convert.ToSingle(line) End If Next [/code]

Member Avatar for Reverend Jim
0
146
Member Avatar for Sevyt

I would imagine the logical place to put the code to clear the textboxes (or repopulate them) is in the same place that determines and displays the labels above those same textboxes. You could place the labels and textboxes in a container (like a groupbox) and use a loop like …

Member Avatar for Mitja Bonca
0
97
Member Avatar for Farhan_B

Please try to explain this a little clearer. [QUOTE]i have two textboxs which have figues in them and need the 3rd textbox to display the figure[/QUOTE] I have no idea what you want to display in the third textbox. I also have no idea why you are using a SQL …

Member Avatar for Farhan_B
0
237
Member Avatar for Farhan_B

We can probably give more help if you can be more specific as to the type of search. Lacking that, it looks as if you are on the right track. SQL uses "%" and "_" for wildcarding. A good explanation with examples can be found [URL="http://www.w3schools.com/sql/sql_wildcards.asp"]here.[/URL]

Member Avatar for Farhan_B
0
213
Member Avatar for Farhan_B

I would start with the following tables and add fields as required. The Items table is your basic inventory of available items that can be ordered (one record per item). The Orders table contains a unique (program generated) order number plus some other info that is common to the entire …

Member Avatar for Reverend Jim
0
128
Member Avatar for CriticalError

Your "Case zoom = 1" and "Case zoom > 1" may never get executed. If zoom = 1 then it will get processed by the "Case zoom < 63" clause. If zoom = 12 then "Case zoom < 63" will also trap it. You'll have to define your case clauses …

Member Avatar for CriticalError
0
118
Member Avatar for BeeKeeper18

Please see [URL="http://www.daniweb.com/software-development/vbnet/threads/416249"]this thread that you were posting in.[/URL] The dictionary also supports a Remove method as in records.Remove("095") You could then (using the example in that other thread) System.IO.File.WriteAllLines(outputfilename, records.Values.ToArray) which creates an array of strings from the remaining values in the dictionary and writes them to a file.

Member Avatar for Reverend Jim
0
356
Member Avatar for kumika

Are you talking about the values accessed via My.Settings? If so, please post your code. Check if your settings are defined with Application or User scope.

Member Avatar for kumika
0
258
Member Avatar for shilpanayar

For this example, both ListBox1 and ListBox2 have the Sorted property set to True. [code] Public Class Form1 Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load 'add some words to ListBox1 Dim words() As String = Split("Some luck lies in not getting what you thought you wanted but …

Member Avatar for Jx_Man
0
126
Member Avatar for mshdpotato

Buttons can be easily added and removed at runtime. I assume that the processing behind each button will be similar (varying only in name and cost of the item, etc)? If you provide more information I can be more specific as to whether this is a reasonable approach.

Member Avatar for Reverend Jim
0
160
Member Avatar for mpathma

There are two ways you could do it. If you have to do it ar run time then you can do [code] For Each ctrl As Control In Me.Controls If TypeOf ctrl Is OvalShape Then CType(ctrl,OvalShape).Size = New Size(20, 20) End If Next [/code] If you want to do it …

Member Avatar for Reverend Jim
0
355
Member Avatar for tariqi
Member Avatar for Reverend Jim
0
46
Member Avatar for zeroflee09

You relate two (or more) tables by having one or more columns in common. For example, a customer database would typically have a customer information table similar to [code] CUST_INFO Cust_ID Last_Name First_Name Address [/code] where Cust_ID is a unique number generated by the app or the datbase system. Any …

Member Avatar for zeroflee09
0
99
Member Avatar for zeroflee09

I don't have enough info to really understand your problem or to comment on a possible solution but I do have a suggestion as to your table design. I strongly suggest that you create a separate table that contains (minimum) two columns. One column should be the patient's name, the …

Member Avatar for adam_k
0
138
Member Avatar for jcgldr

It would help if we knew what type of database you are using. In MS SQL Server, there is a function (COALESCE) that can be used to substitute other values if a database field contains NULL. For example, the following query select last_name, middle_name, first_name from myTable would return NULL …

Member Avatar for Begginnerdev
0
2K
Member Avatar for Mits14

Use the BoldedDates property. Create an array of dates that you want to be displayed in bold and assign it to this property. Dim myDates() as Date . . . myCalendar.BoldedDates = myDates

Member Avatar for Reverend Jim
0
97
Member Avatar for gozo12

Select the DataGridView in designer mode and examine the entries under the Events tab in the properties panel. You will see events like CellClick CellEnter CellLeave etc. One of them should be what you are looking for.

Member Avatar for Jx_Man
0
123
Member Avatar for jd2369

There is probably a solution that can be used from inside VB, but if one is not forthcoming I can suggest AutoIt. I have used this free (and very well supported) package to automate many tasks. You can write scripts using AutoIt's native scripting language, or you can write them …

Member Avatar for Reverend Jim
0
960
Member Avatar for sushmapotla

You could install a PDF printer (Cute PDF Writer is free), then create a Word application object in VB and use that to load and print the document. We don't write the code for you. For that matter, you don't need VB for that. Just use word to load and …

Member Avatar for Reverend Jim
0
45
Member Avatar for gozo12
Member Avatar for game4tress

You might want to have a look at SyncBack. It comes in three versions: SynBack Pro $55 SyncBack SE $35 SyncBack Basic (Free) The free version supports scheduled backups. You can compare all three versions [URL="http://www.2brightsparks.com/syncback/compare.html"]here[/URL] It is highly configurable. You can select many options on backup such as what …

Member Avatar for ninjatalon
0
1K
Member Avatar for PutingPanday
Member Avatar for Reverend Jim
0
133
Member Avatar for reds8

To delete a control on the form you can do Me.Controls.Remove(controlname) controlname = Nothing So if you want to remove a button named (for example) btnAdd just do Me.Controls.Remove(btnAdd) btnAdd = Nothing To remove all controls of a given type (eg TextBox) do [code] For Each ctrl As Control In …

Member Avatar for Reverend Jim
0
1K
Member Avatar for zhouy

I think the technique you want to use is called Gaussian Elimination. I must have written this code a half dozen times when I was back in university. I did versions with simple elimination, partial and full pivoting (actual and virtual). I hated it every time and I have long …

Member Avatar for zhouy
0
1K
Member Avatar for qwertypwner

My son had this problem with his Alienware laptop. It turned out that he was not running in high performance mode. Check that you have this mode selected. Also, make sure you have disabled any hotkey that might change the performance mode to a lower setting.

Member Avatar for caperjack
0
208
Member Avatar for magnus-110

You could try the encrypt/decrypt functions posted by sandeepparekh9 [URL="http://www.daniweb.com/software-development/vbnet/code/366392"]here[/URL]

Member Avatar for sprogrammer
0
101
Member Avatar for easterbunny

Couldn't help but notice there is no "Handles" clause on private void Button_Click(object sender, RoutedEventArgs e) so perhaps nothing is happening because the code isn't attached to the button.

Member Avatar for easterbunny
0
4K
Member Avatar for Reverend Jim

I would like to see a "Subscribe to Thread" feature added. There are occasions when I want to be notified if there are new postings to a thread, even when I feel I have nothing to contribute. I (generally) don't like posting unless I can make a contribution to the …

Member Avatar for deceptikon
0
222
Member Avatar for raheel88

It is certainily possible to create an array of controls. There are several ways to keep track of them. You could use a dynamic array or a dictionary (to name two). Just declare the array as follows Dim ctrlarray(ListView1.Items.Count - 1) As PropertyGrid You create a new instance as ctrlarray(i) …

Member Avatar for raheel88
0
1K

The End.