- 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
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 |