97 Posted Topics
Re: Do you actually have a Bridge_Number Field in your Table? If you are using An Access DataBase I would first get the Query string into the "SQL View" of the Query Design window in MS-Access and test it. Also make sure you have spelled the Field names correctly. They have … | |
Re: Write it Once and call it from the two places that you wanted to write. I used the following Private Sub dgv1_UserAddedRow(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewRowEventArgs) Handles dgv1.UserAddedRow bs.ResetBindings(False) **UpdateDatabase()** End Sub Private Sub dgv1_UserDeletedRow(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewRowEventArgs) Handles dgv1.UserDeletedRow bs.ResetBindings(False) **UpdateDatabase()** End … | |
Re: How about trying this "SELECT * FROM Appointments WHERE TimeAvail=True AND Format(AptDate,'dddd') = 'Monday';" | |
Re: As found on GOOGLE public static boolean isLeapYear(int year) { assert year >= 1583; // not valid before this date. return ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0); } | |
Re: abdalqader.abdelhalem according to your post you are using ms access to fill the datagridview, I will assume (and I hate to do that) you are filling a datatable and using it as the source for the DataGridView. Why not query the datatable for your string using LINQ. If the data … | |
Re: Do you have any hidden columns? if so you might need to unhide them run your sub and then re-hide them. | |
Re: Killer88 You might try doing some reading on database access in vb.net. There are many threads here on Daniweb and Google has thousands. Your question says you are trying to run before you can walk. [Click Here](http://www.daniweb.com/software-development/vbnet/threads/443944/writing-to-access-db-issue) | |
Re: If you're looking for the number of days in a given month use the following Dim daysInMonth as Integer = System.DateTime.DaysInMonth(YYYY, MonthName) If that's not what you're looking for you will have to give a little more of what you want. | |
Re: Try this Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsx; Extended Properties="Excel 12.0 Xml;HDR=YES"; [Click Here](http://www.connectionstrings.com/excel-2007#ace-oledb-12-0) | |
Re: You could use the DataView to find and compare your values. From MSDN --> [Click Here](http://msdn.microsoft.com/en-us/library/yth8t382(v=vs.90).aspx) | |
Re: You could just create a windows form put the Username and Password textboxes with the appropriate buttons for the login and 12 hidden buttons for the Excel files. When user logs in successfully hide the login boxes and buttons and make your 12 Excel buttons visible. Then when the button … | |
Re: Just off hand you call the ExecuteReader twice. You also have to get the value of the field from an ordinal and value while casting it to the typw you expect. | |
Re: How about saving the required info to an XML/CSV file or a access/sqlServer datatable Then when the app opens fill your list view you select and query for the Info and fill the for. | |
Re: It depends on the security and type of database. There is the Connection.GetSchema method to return what you are looking for. From MSDN [Click Here](http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbconnection.getoledbschematable(v=vs.90).aspx) | |
Re: How about just using a query to do the work unless you want to edit the data. INSERT INTO newTable (fieldList) SELECT fieldlist FROM oldTable | |
Re: Read This [Click Here](http://vbcity.com/forums/p/102886/436553.aspx) | |
Re: joyvin: I'm certain you cannot run an insert command with the InsertCommand.ExecuteReader command. | |
Re: Hi cmstoner , what is the access database data type of your Business Phone field from the design view in ACCESS? If this is correct could you post the entire Insert command after you have built it? | |
Re: HibaPro, you can get the totalseconds of your timespan and use that to create a double then do the multiplaction. TimeSpan.TotalSeconds | |
Re: The text file with this post has one line of text and a newline. You can use either VBCRLF or VBNEWLINE Dim txt As String = My.Computer.FileSystem.ReadAllText(My.Computer.FileSystem.SpecialDirectories.Desktop & "\newLine.txt") If txt.Contains(vbNewLine) Then MsgBox(txt.IndexOf(vbNewLine)) End If | |
I am hoping this is not inappropriate to do on here if it is I apologize in advance and will let the thread die a slow agonizing death. Here goes: I have a little TextBox app that's supposed to only allow numeric’s positive and negative and allow 2 decimal places. … | |
Re: You want to give this a read http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbdataadapter.insertcommand(v=vs.90).aspx | |
Re: I may be off the edge of the map here but Why are you using the cmd.ExecuteReader to Insert values into a table when you should be using cmd.ExecuteNonQuery? | |
Re: Well the first thing I see you are asking the sub to compare column 6 to column 4 are you aware datagridview columns are a zero based index so column 4 should be 3 and column 6 should be 5. Are you getting any errors or is nothing happening? Have … | |
Re: I would use a dataadapter to fill a dataset. Set the table from the Dataset as the DataSource of a BindingSource then set the BindingSource as the DataGridViews DataSource. Then you just call DataAdapter's update method when you update, add or delete records in your DataGridView. This will reflect all … | |
Re: One thing I see, your xml file when read into a dataset creates 4 data tables. I'm not sure what you want displayed, but if you want all the data from the xml file displayed in the datagridview you'll have to change the structure of your xml. | |
Re: Not to beat a dead horse, but you could just call this Sub like the following: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Call DoControls(Me) End Sub Private Sub DoControls(ByVal ctrlCont As Control) For Each ctrl As Control In ctrlCont.Controls If TypeOf ctrl Is CheckBox … | |
Re: Try this [Click Here](http://www.mysqltutorial.org/sql-like-mysql.aspx) | |
Re: You'll need to brush up on Registry Coding and use To disable the Windows key, follow these steps: 1.Click Start, click Run, type regedt32, and then click OK. 2.On the Windows menu, click HKEY_LOCAL_ MACHINE on Local Machine. 3.Double-click the System\CurrentControlSet\Control folder, and then click the Keyboard Layout folder. 4.On … | |
Re: How did you get away with creating a Class with NO NAME? I just attempted to recreate your code and I had to assume you were using a Form as you had textboxes and pictureboxes and it will not let me in vs2008 sp1 create a class with no name. … | |
Re: Please see attached doc file. I'm not having any luck formatting this at all. Dim dr As DataRow = FrmSamplDataSet.Tables(0).NewRow dr.Item(1) = "Tony's Express" dr.Item(2) = "(999) 863-9854" FrmSamplDataSet.Tables(0).Rows.Add(dr) Me.TblShippersTableAdapter.Update(FrmSamplDataSet) | |
Re: As G Waddell said you should look around. On this very website [Click Here](http://www.daniweb.com/software-development/vbnet/threads/75893/how-to-connect-a-sql-stored-procedure-to-a-windows-application) This is also a good place to begin [Click Here](http://www.fryan0911.com/2009/05/vbnet-tutorial-sql-database-basics.html) | |
Re: For insert query [Click Here](http://www.techonthenet.com/sql/insert.php) For Executing The Command [Click Here](http://vb.net-informations.com/ado.net-dataproviders/ado.net-executenonquery-oledbcommand.htm) You might want to have a go at this >>[Click Here](http://vb.net-informations.com/) Lots of helpful info on that site | |
Re: Have you thought of using an XML file instead of the CSV. You could take advantage of the DataSet.Read and DataSet.Write methods. | |
Re: Hi Jim, I ran what you had set up in your test and tried TableLayoutPanel1.SendToBack and Me.BringToFront neither worked, Bummer. Now for my question since you're getting the Panel MouseEnter event to fire isn't that the same as the Mouse entering the form or do you need the event Argument … | |
Hello all. I have a question on searching a List(Of CLass). I am not sure how it is labeled List<OF T> or List(Of Class) However you label it here is the Class EXT Public Class EXT Implements IComparable Private m_extension As String Private m_exe As String Private m_description As String … | |
Re: When your program is running how many forms would the user have open at one time? Are any of these Child forms? If they are not child forms you can use the following Form Wide Variable Dim sef As frmDailySales >>frmDailySales is a Form. Then in the event you want … | |
Re: Could you post the rest of the Exception? Also did you click 'Generate' the Update Delete etc. When you configured the dataadapter? | |
Re: Dim lines() As String lines = TextBox1.Lines Dim amper As Integer = 0 For Each l In lines amper = l.IndexOf("@") MsgBox(l.Remove(amper, l.Length - amper)) Next | |
Re: You have no Single quotes around KMBPartNo Dim SelectQry = "SELECT * FROM TblSupplierQuotes where TenderNo='" & Me.txtTenderRef.Text & "' AND KMBPartNo='" & Me.lbKMBPartNo.Text & "';" | |
Re: Well in a Form project just use labels and textboxes for the console.reads and console.writes keep the YouTube class and ditch the module Add a Button for the user to click when they have entered the user name and password. Let me know if you need any more help. | |
Re: You could capture the KeyPress Event of the TextBox and allow the user to only enter what you want. You check the value of the KeyPressEventArgs. I usually use it so I don't have to code the ooops you didn't enter the proper value sub/functions. There is also a nice … | |
Re: How bout you give the StringBuilder a go? Import SYSTEM.TEXT If IO.File.Exists("C:\Customers.txt") = False Then IO.File.Create("C:\Customers.txt") End If Dim FILE_NAME As String = "C:\Customers.txt" If System.IO.File.Exists(FILE_NAME) = True Then Dim sb As New StringBuilder sb.AppendLine("CustomerID CustomerName") For i As Integer = 0 To dgvMain.Rows.Count - 1 sb.AppendLine(dgvMain.Item(0, i).Value.ToString() & " … | |
Re: I created a XLXM workbook added a simple macro that open a messagebox and puts the number 2 in B1 cell then saves the workbook as a XLSX file and does not save the 2 in cell B1 of the xlsm file. Here is the code. Hope this helps. Imports … | |
Re: This may help>>> http://www.google.com/#hl=en&sclient=psy-ab&q=microsoft.jet.oledb.4.0+apostrophe&oq=oledb+4.0+ap&aq=0mK&aqi=g-mK3&aql=&gs_l=hp.3.0.0i5i30l3.0.0.1.125.0.0.0.0.0.0.0.0..0.0...0.0.C-DPYOs_k5I&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.,cf.osb&fp=be92a6bf3be444e8&biw=1024&bih=600 | |
Re: There's a lot missing from your code. It would help if you explain what it is you want to accomplish. | |
Re: http://msdn.microsoft.com/en-us/library/xaz41263(v=vs.90) |
The End.