Hi all,
I have a SQL Server 2000 table that holds a long list of parts. Each row is show something like this:
ID Cont# Str# PartID GdrNo Qty Length Width Thick Grade
1 927 001 P12 A1 3 2100 250 12 S355J2G3
2 927 001 P13 A1 6...
Hi all,
I've imported a csv file into SQL Server 2000 and it is riddled with duplicates. Each record has a quantity and what I want to do is remove the records that are duplicated and finally end up with one record which has an updated quantity.
So, for example, part P12 is found on 3 records...
Really easy question for you guys...
How on earth do I call multiple stored procedures? I've got 2 procedures, sp_ADDCOLS and sp_SPLITDIMS, all I want is some SQL that allows me to run sp_ADDCOLS and then sp_SPLITDIMS.
I'm sure it's very simple but it's driving me mad!
Today is the tomorrow...
Hi all,
I am looking to split a value held in a SQL Server 2000 table, and the split results need to be returned into 2 new fields on the same row.
For example:
Field 1 = 900X10FLAT
Field 2 = 900
Field 3 = 10
The value in field 1 should be split into the other 2 fields. These values will...
Hi all,
I've got a datagrid on a windows form which is populated by a CSV file, using the following code:
If OpenFileDialog1.ShowDialog(Me) = DialogResult.OK Then
Dim fi As New FileInfo(OpenFileDialog1.FileName)
Dim sConnectionString As String =...
Hi all,
I'm using Visual Studio 2003 and SQL Server 2000.
I am looking to insert the contents of a csv file into an existing SQL Server table. I would like to do this via VB.NET.
Could someone post some code to show me how to do this? Is it easier if I import the csv into a datagrid and then...
Hi all,
I am using the following code to fill a datagrid with the contents of a csv file.
If OpenFileDialog1.ShowDialog(Me) = DialogResult.OK Then
Dim fi As New FileInfo(OpenFileDialog1.FileName)
Dim sConnectionString As String =...
Hi all,
I have the following code populating a datagrid and also setting some of the columnstyle settings:
SqlDataAdapter1.Fill(DsPlates1)
DgPlates.DataSource = DataView1
Dim ts1 As New DataGridTableStyle ' Table stlye
Dim cs0 As DataGridColumnStyle = New...
Hi all,
I've got 2 forms, Form1 and Form2.
Pressing a button on Form1 sets Form1.enabled = False and also opens Form2. Pressing a button on Form2 should set Form1.Enabled = True and close itself. Although Form2 does close, Form1 remains disabled.
My code for enabling Form1 is as follows...
Hi all,
I'm trying to run a filter upon some information shown to the user on a windows form using the following code:
DataView1.RowFilter = "Title Like '*" & TextBox3.Text & "*' OR Solution Like '*" & TextBox4.Text & "*'"
Each textbox has a default value of *. This is so that if one of the...
Hi all,
I've got the following code that helps the user filter a dataview on a series of textboxes.
DataView1.RowFilter = "(Title Like '*" & TextBox3.Text & "*' OR Description Like '*" & TextBox3.Text & "*') AND UserRep Like '" & TextBox1.Text & "'"
What I want is for the user to be able to...
Hi all,
I am looking at importing a csv file into a table in SQL Server. I would like to do this via a VB.NET windows application.
Either before or after my import, I need to manipulate the csv file so that certain information is split out (creating new fields) and other information is...
Hi all,
I have a combobox on a form that the user must make a selection from. It must not be left blank.
I fill the combobox list with the following code and also blank the text.
SqlDataAdapter4.Fill(DsCat11)
ComboBox2.DataSource = DsCat11.Category1
ComboBox2.DisplayMember = "Cat1"...
Hi all,
I've recently changed PC's and started getting the following error when trying to open any of the projects located on the network.
"the project location is not fully trusted"
I remembered this problem from my previous PC so I opened up .NET Configuration and set up a code group under...
Hi all,
I have the following test code running on a windows form, simply to show the users a progress bar in action. As the progress bar rises, I want the label to display a different message:
Label1.Text = "Copying Text File"
ProgressBar1.Value += 5
Sleep(5000)...
Hi all,
I'm setting the value of a combobox (combobox3) off selection made from another combobox (combobox2). The value chosen gets passed through a sqlcommand and is returned to combobox3 using a dataset.
the code I'm using is listed below:
Private Sub ComboBox2_SelectedIndexChanged(ByVal...
Hey all,
I'm using the following code to create a uniquie ident on a windows app:
TextBox2.Text = DateTime.Now.ToString().GetHashCode().ToString("x")
This inserts my unique ident (based upon) current date time in textbox2 upon the loading of the form. There are only 4 users on this app and...
Hi all,
I'm trying to do something that I thought would be quite simple but I can't work out how to do it at the moment.
I have a monthcalendar on my windows form and i want to let the user select any date they would like off it. The date selected should then be returned to a text box...
Hi all,
I'm looking to move a selection of rows from one datagrid (DG1)to another (DG2) by drag n' drop. Each datagrid is bound to a SQL Server table. When a row is dragged from DG1 I want that row to change to red.
I do not want the row(s) to leave DG1 but I do want the row(s) to appear in...
Hi all,
I've got two tables. One on worksheet 'Front' and one on worksheet 'Workings'
On the 'Front' sheet I have a series of dates (Filling cells A5:P30, although some cells may be blank). Ont he 'Working' sheet I calculate the number of working days between the date on the front sheet and...
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.