- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 17
- Posts with Upvotes
- 15
- Upvoting Members
- 15
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
97 Posted Topics
Re: give thisread [Click Here](http://www.codeproject.com/Tips/311959/Format-a-textbox-for-currency-input-VB-NET) | |
Re: If your CSV File has headers you can Just get the columns you want by the SELECT Query. Dim objCmdSelect As New OleDbCommand("SELECT Col1,Col2,col3... FROM " & fi.Name, objConn) | |
Re: I haven't had a chance to test this but I'm pretty sure you can ->Instead of deleting your record from the datatable. ` Me.TransmissoesDataSet.Tables("utilizador_Avancado").Rows(itemFound).Delete()` Remove the item from the BindingSource and call ResetBindings(False) Method. bs.RemoveAt(itemFound) bs.ResetBindings(False) Then Accept changes method on the table. You should be able to use the … | |
Re: Can you show some code where your error is happening. From the message it would seem you are trying to execute a query with the connection Closed. | |
Re: The following code shows how to put a table and some other minor things into a word doc. It's part of a database schema app. displaying the table name column names and their datatype ordinal position and if nullable. So the dbname and the table name are not important just … | |
I have a question about the string.intersect method. I am not getting the results I expect. Dim lstChars1() As Char = "hello dolly" 'TextBox1.Text.ToCharArray Dim lstchars2() As Char = "help melanie" 'TextBox2.Text.ToCharArray Dim lst1 As New List(Of String) Dim lst2 As New List(Of String) For Each c In lstChars1 lst1.Add(c.ToString) … | |
Re: What exactly are you trying to do? You have an array of Button then you give a variable btnName a type Button without using it. Then you take your button in the array and try to create a new button without the array index. Not sure what event handler you … | |
Re: ignnniter, see if this helps you get your head around it. I have a button and two textboxes on a form use the default names in the click event put this. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim lstChars1() As Char = TextBox1.Text.ToCharArray Dim lstchars2() As … | |
Re: You didn't provide the name for the file in the destination My.Computer.FileSystem.CopyFile("C:\Users\coder\Desktop\EXCEL PROJECT\excel\1_2012.xlsx", My.Computer.FileSystem.SpecialDirectories.Desktop & "\TestCopy.xlsx", True) [Click Here](http://msdn.microsoft.com/en-us/library/ms127964(v=vs.110).aspx) | |
Re: Probably shouldn't help dredge up this post but it was never actually answered in VB so here goes. Intellisense will give you 10 choices of how you want to Align your header text. VS2008 / 2012 DataGridView1.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomCenter | |
Re: Why not bind the datagridview to a bindingsource. the reset the bindingsource. You will need a datatable or a collection but that should give you what you want. All you have to do is clear the datasource of the bindingsource and call the ResetBindings(False) method on the bindingsource | |
Re: Try the following in your code. If it doesn't work take the single quotes from around searchStr it is probably Type integer in the Database Table Dim cmd As New OleDbCommand Dim da As OleDbDataAdapter With cmd .CommandText = "select * from car where Renter_ID = '" & searchStr & … | |
Re: Why not look for the LastIndexOf("0") [Click Here](http://msdn.microsoft.com/en-us/library/system.string(v=vs.110).aspx) | |
Re: Hello Jimmy_1, Just want to ask a few questions. From each of the worksheets how many Columns are you totaling and Are you Creating a new Worksheet in a new workbook from the others or do you just need the totals of the columns? For the Daily run you could … | |
I've been working on a Textbox that only accepts 0-9, Decimal Point, and the Backspace Keys. Also keeps it in the base form 0.00. Max value is 999999.99 can be set as needed. It works as expected, but I have to ask if I have remade the wheel. This sub … | |
Re: You could use a BindingSource with the DataGridView. Then when your records are inserted successfully call the ResetBindings() Method. [Click Here](http://msdn.microsoft.com/en-us/library/system.windows.forms.bindingsource.resetbindings(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1) Add the item to the Combox Items List. | |
Re: This is free [Click Here](http://www.dotnetheaven.com/article/sql-server-database-programmatically-in-vb.net) | |
Re: See if the following will help Dim lstTextboxes As New List(Of TextBox) Private Sub LoadTextBoxList() lstTextboxes.Add(txtCustomername) lstTextboxes.Add(txtPartcode) lstTextboxes.Add(txtinvo) End Sub Private Sub btnTEST_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTEST.Click Dim query = From tb In lstTextboxes _ Where tb.Text = "" _ Select tb.Name 'CALL SQL METHOD … | |
Re: tatacco; "My advice to you is to start drinking heavily" -John 'Bluto' Blutarsky | |
Re: Im not sure about using the "AND"'s in your UPDATE statement there should be commas seperaing your fields and values. Here is a test query(StoredProcedure) I have in one of my access DB's. If you are going to be using this UPDATE query often you should create a stored procedure … | |
Re: I see in 3 subs you are creating the same named dataset--> `DtSet`. The DataSet needs to be Global enough for the consumers of it within the project. This is probably why you are getting the * object reference not set to an instance of an object* error. | |
Re: I believe you need to set the combobox properties in the proper order. .DisplayMember = "Need to set this one too" .ValueMember = "ItemName" .DataSource = ds.Tables(0) Also how are you accessing the selecdt item/value when a combobox item is selected? the variables datatype needs to be the same as … | |
Re: For starters In your Select Query you will need to add a Parameter for @Course. cmd.Connection = conn cmd.CommandType = CommandType.Text cmd.CommandText = sSQL cmd.Parameters.AddWithValue("@Course",value of Course) I also wouldn't open the connection until you have the Command Initialized but thats just me. | |
Re: You could query the worksheet to a datatable. Then loop thru the rows getting the items you want into the ComboBox. After that its just a matter of using the index of the ComboBox Item to get the value for your TextBox. dt.Rows(comboIndex).Item(columnNumber of value you want).ToString. | |
Re: myconnection = New OleDbConnection("provider=microsoft.ACE.OLEDB.12.0;data source=C:\Users\DELL\Documents\Visual Studio 2012\Projects\WindowsApplication9\WindowsApplication9\NIBM.accdb") myAdapter = New OleDbDataAdapter("select*from Driverdetails", myconnection) myAdapter.Fill(Ds, "Driverdetails") myconnection.Close() ** DataGridView1.DataSource = Ds.Tables(tableName or index)** DataGridView1.DataMember = "Driverdetails" End Sub You need to Set the DataSource of the DataGridView to a particular table of the dataset | |
Re: Give the following a read [Click Here](http://msdn.microsoft.com/en-us/library/bb404903.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-5) | |
Re: In your Sub newGame() You are Dim(ing) a variable named randomNumber instead of just reassigning your global variable new value. Since it's scope is local to only the Sub newGame it will have no effect on the global variable randomNumber and it will be whatever you assigned it in the … | |
Re: Try the following Dim id as Integer = Command.ExecuteScalar() | |
Re: Give the following Link a try [Click Here](http://www.authorcode.com/search-text-in-word-document-in-vb-net/) | |
Re: Have you written anything yet? You should read this post http://www.daniweb.com/software-development/vbnet/threads/460782/help-with-accessing-data-from-an-ms-access-database-with-vb | |
Re: I did a search on MSDN and Google and couldn't find one entry for the " exchange text box control"... must be something new coming in VS.Net 2014? | |
Re: You might try something like this..... Private Sub addSelectedClickHandlers(ByVal gb As GroupBox) Try For Each selectedControl As Control In gb.Controls AddHandler selectedControl.MouseMove, AddressOf selectedControl_MouseMove AddHandler selectedControl.MouseLeave, AddressOf selectedControl_MouseLeave Next Catch ex As Exception Debug.Print(ex.ToString) End Try End Sub | |
Good Day all, My question is When I get the schema of an EXCEL worksheet with Column headers I get what's expected the names of the columns but when I get the schema of a worksheet without headers I get the first row of data as the Column Names. The … | |
Re: I could not reproduce the problem you are having without using `Me.Activate` Then I got a list of the Processes Names and ID's into a Dictionary and used The 'EXCEL' Process ID to Activate the WorkBook with **AppActivate(procId)** Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click TextBox1.Text = … | |
Re: Give this page a Look [Click Here](http://www.codeproject.com/Questions/621533/How-to-import-the-excel-data-to-MS-access-database) | |
Re: If all your tables are actually filled with data then DataGridView3.DataSource = query.ToList should load your DataGridView | |
Re: Im suprised these two commands didn't throw errors. Me.PlannedDurationTextBox = "" Me.PlannedRemarksTextBox = "" Anyway I do not see where you are calling Me.FourPPMCheckBox1.Value = False | |
Re: How about reworking your code to say For Each Item In ComboBox1.Items If ListBox1.Items.Contains(Item) Then MsgBox("You can't add those items twice.", MsgBoxStyle.Exclamation) Else ListBox1.Items.Add(Item) End If Next | |
Re: What is the datatype of your UserID in the "User" table? You are providing String Type to check against them in your table. | |
Re: I'm working on a small database app to organize my song files and threw together this little sub to demonstrate a Null value in one of the columns of a record. It's OldeDB but should easily be adapted to SQL. I purposely left the Album name out on one of … | |
Re: When I use a DataAdapter and the CommandBuilder with a BindingSource I call the Update on the DataAdapter as follows. da.Update(ds, "TableName") | |
Re: You are creating a new DataSet each time you run this code so the table your DataGridView is using gets refreshed with only the record queried for. You might try using the Datareader to fill the DataTable you're using for your DataGridViews DataSource. You can create some variables to hold … | |
Re: If you used a DataAdapter DataSet and bound your datagrid with a BindingSource all you would have to do is call bindingSource1.ResetBindings(False) you would get the functionality you're looking for. Here is some sample code to point you in that direction. Imports System.Data.OleDb Public Class Form1 Dim conn As New … | |
Re: I'm not trying to step on any toes, I just wanted to offer another approach. Also love the way Regex works. Imports System.Text.RegularExpressions Module Module1 Sub Main() Dim s As String = "ajasasaj$testing%878788%%$lkshhajsjah" Console.WriteLine("The Number Of Records in the line = " & NumberOfRecords(s, "$").ToString) Console.WriteLine() Console.WriteLine("Records with the $ … | |
Re: Why do you need to create an entire new database? Why not just create a new table to hold the new year's data? If you are set on creating a new DB then check out this link [Click Here](http://www.freevbcode.com/ShowCode.asp?ID=5797) | |
Re: How did you load the DataGridView? Where did that data come from? | |
Re: If your DataGridView has a datatable as its datasource why not make use of the datatable read and write xml methods | |
Re: Try using the GetValue method and the ordinal position of the field you want from the query. This would be "Select Field From Table" you are requesting 1 field so that's position 0 ComboBox1.Items.Add(CStr(DataReader.GetValue(0))) | |
Re: Hope this gets you started, it creates the insert query "q". You will need a connection and a command object.... You should read up on Datasets - Datatables - Datagridview - MS ACCESS. There are much easier ways of doing what you want. Please show what you have tried. For … | |
Re: You could just put Exit Sub or Function when you get to the Else after the Error Message. You should break them up into 2 different Functions, A Labor Function and A Parts Price Function Return A Boolean and then when both Return True Execute the rest of your code. |
The End.