User Profile
Collapse
-
Arraylist and DataGridView
I have built an arraylist and have used it to fill an editable datagridview. Now I need to know if I can update the arraylist with whatever edits were made to the datagridview or if the edits need to go directly back to the database. Any help or sample code would be most helpful. -
Updating a database in VB.Net
I have a sql database that contains several thousand records that need to be numbered sequentially from 1 through the end. I have tried several different ways and nothing seems to hit the database. I've included my attempts and would greatly appreciate any help.
...Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim cmdSave As New SqlClient.SqlCommandLast edited by tlhintoq; Aug 18 '09, 06:02 PM. Reason: [CODE] ...your code goes here... [/CODE] tags added -
Chaning a file's extension
I'm writing an import application that import .csv files into my SQL Server 2005 database. When the import is complete I need to change that files extension from .csv to .imp with the same path. I've tried using the following:
FileSystem.Rena me(fullpathofol dfile, fullpathofnewfi le)
Microsoft.Visua lBasic.Rename(f oldfile, fullpathofnewfi le)
My.Computer.Fil eSystem.RenameF ile(foldfile, fullpathofnewfi le)
... -
Crystal Reports 8.5 and VB.Net
I have many, many reports in crystal 8.5 that I need to integrate into my new VB.net application. I have no code and no idea how to pass parameters and/or open different reports in .net. The user goes through a 'wizard' that I created to choose whatever parameters that particular report (picked from a drop down menu containing all reports) requires. However, I don't know how to passed the selected parameters to my crystal report viewer control... -
Treeview and hashtables
I have treeview with checkboxes on it and need to update the database(if unchecked) and insert into the database(if checked) in my button click sub routine. I'm using a hashtable to avoid having 'duplicate keys' in run time. I'm obviously doing something very wrong because the code jumps straight from the 'For each' statement to the 'End Sub' line.
...Code:Private Sub cmdUpdate_Click(ByVal sender as System.Object, ByVal e as System.EventArgs)
-
Adding String Values
I've got 2 labels (lblDSPCash and lblLCash) that are setup:
Format(dsDSPCas h.Tables("dspca sh").Rows(0)("d spcash"), "Currency")
and
Format(dsLCash. Tabls("localcas h").Rows(0)("lc ash"), "Currency")
My 3rd label (lblTCash) is supposed to be a 'sum' of the other two. I've tried the following code but it rounds to the nearest dollar:... -
Combo Box interaction
I have a combo box that I've hard coded Yes No into the 'Items...(Colle ction)' area. However, users are able to input anything into the combo box and my code breaks when saving. Is there a property that I can set that will allow users to choose Yes or No, but not allow them to enter anything?
Thanks
Mike -
Closing a form
I'm running an application that has several subsequent forms. I'd like to be able to close the individual form without closing the app. I've included my code and would appreciate any help.
If RUS_Exit("Form Exit") Then
Me.Close()
Else
e.Cancel = True -
I've tried the .Refresh() and nothing happens. Where should I put the 'Listbox bob = new ListBox()' line? -
I've got a VB.net form that has two listboxes that are populated from two different hashtables. lbAvail is a listbox with all users. lbAssign is a listbox with users for a particular dept. When you pick a user in lbAvail and click 'Assign' (cmdAssign command button), that person is then assigned to the dept. Unfortunately, lbAssign isn't updated after the click event. I have to close the app. then re-run it to see the updated lbAssign.Leave a comment:
-
Refresh
I'm using a button click to move users from one list box to another. Is there a way to 'refresh' the listboxes at the end of the click event? Thanks -
Mr. Steve,
Thank you sooo much. That worked, which I'm sure you're not surprised. You solved in an hour what I've been working on for 3 weeks. Thanks again for your help.Leave a comment:
-
My question is: How do I test the data to see if the characters are numbers? And how do I add them to a string if they are?Leave a comment:
-
IsNumeric()
So I'm passing a masked telephone number in the form of (999)999-9999 to a Function that 'strips' the numbers out and puts them into a string that I then use in an Update SQL statement. So far I have the code below that of course doesn't do anything:
Function StripPhone(ByVa l sPhone as String) as String
Dim i as Integer
Dim sStripped as String
For i = 1 to Len(sPhone)
... -
Is there any way that you can give me an example of how to accomplish either or both of those solutions. I really appreciate your help.Leave a comment:
-
Data in Masked Edit Text Boxes
I have unformatted text in my SQL 2005 database. I'm pulling it into a masked edit text box with a (999)999-9999 mask. Unfortunately, when I attempt to save the data back it doesn't work because I don't know how to get the 'masked' information back to the 'unmasked' raw data that the database wants.
No activity results to display
Show More
Leave a comment: