97 Posted Topics

Member Avatar for Nebil

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 …

Member Avatar for Nebil
0
761
Member Avatar for Papa_Don

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 …

Member Avatar for tinstaafl
0
285
Member Avatar for mikeybware

How about trying this "SELECT * FROM Appointments WHERE TimeAvail=True AND Format(AptDate,'dddd') = 'Monday';"

Member Avatar for kRod
0
418
Member Avatar for Violet_82

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); }

Member Avatar for Violet_82
0
284
Member Avatar for abdalqader.abdelhalem

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 …

Member Avatar for kRod
0
151
Member Avatar for Rachna0309
Member Avatar for kRod
0
185
Member Avatar for lionheart84

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)

Member Avatar for azareth
0
706
Member Avatar for soweto007

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.

Member Avatar for kRod
0
54
Member Avatar for HBovenkamp

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)

Member Avatar for HBovenkamp
0
2K
Member Avatar for tinu28

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)

Member Avatar for TnTinMN
0
106
Member Avatar for ashvyas

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 …

Member Avatar for kRod
0
169
Member Avatar for guillier

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.

Member Avatar for guillier
0
127
Member Avatar for sean.downes.96

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.

Member Avatar for jireh
0
143
Member Avatar for thewilf

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)

Member Avatar for TnTinMN
0
195
Member Avatar for mohana_61

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

Member Avatar for mohana_61
0
342
Member Avatar for Jamblaster
Member Avatar for ssimkhan

joyvin: I'm certain you cannot run an insert command with the InsertCommand.ExecuteReader command.

Member Avatar for kRod
0
186
Member Avatar for cmstoner

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?

Member Avatar for cmstoner
0
841
Member Avatar for HibaPro

HibaPro, you can get the totalseconds of your timespan and use that to create a double then do the multiplaction. TimeSpan.TotalSeconds

Member Avatar for HibaPro
0
620
Member Avatar for Sahil89

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

Member Avatar for Sahil89
0
3K
Member Avatar for kRod

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

Member Avatar for kRod
0
2K
Member Avatar for themaj

You want to give this a read http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbdataadapter.insertcommand(v=vs.90).aspx

Member Avatar for kRod
0
746
Member Avatar for cmstoner

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?

Member Avatar for kRod
0
281
Member Avatar for PM312

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 …

Member Avatar for PM312
0
236
Member Avatar for jerviejeb

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 …

Member Avatar for kRod
0
117
Member Avatar for npmiller

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.

Member Avatar for npmiller
0
2K
Member Avatar for iFrolox

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 …

Member Avatar for iFrolox
0
3K
Member Avatar for mzeewashooo
Member Avatar for mzeewashooo
0
378
Member Avatar for poojavb

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 …

Member Avatar for TnTinMN
0
2K
Member Avatar for Tarqish

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

Member Avatar for Tarqish
0
173
Member Avatar for tendaimare

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)

Member Avatar for kRod
0
555
Member Avatar for tashee2007

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)

Member Avatar for kRod
0
753
Member Avatar for gahhon

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

Member Avatar for gahhon
0
256
Member Avatar for themaj

Have you thought of using an XML file instead of the CSV. You could take advantage of the DataSet.Read and DataSet.Write methods.

Member Avatar for themaj
0
276
Member Avatar for Reverend Jim

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 …

Member Avatar for Reverend Jim
0
2K
Member Avatar for kRod

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 …

Member Avatar for kRod
0
480
Member Avatar for gahhon

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 …

Member Avatar for gahhon
0
106
Member Avatar for Commando123

Could you post the rest of the Exception? Also did you click 'Generate' the Update Delete etc. When you configured the dataadapter?

Member Avatar for Commando123
0
129
Member Avatar for teknogisk

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

Member Avatar for TnTinMN
0
106
Member Avatar for Mike Bishop

You have no Single quotes around KMBPartNo Dim SelectQry = "SELECT * FROM TblSupplierQuotes where TenderNo='" & Me.txtTenderRef.Text & "' AND KMBPartNo='" & Me.lbKMBPartNo.Text & "';"

Member Avatar for poojavb
0
97
Member Avatar for mr3army

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.

Member Avatar for mr3army
-1
982
Member Avatar for gahhon

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 …

Member Avatar for gahhon
1
158
Member Avatar for M.Waqas Aslam

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() & " …

Member Avatar for M.Waqas Aslam
0
192
Member Avatar for belenos46

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 …

Member Avatar for belenos46
0
321
Member Avatar for sebastian3

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

Member Avatar for sebastian3
0
137
Member Avatar for beforetheyknew

There's a lot missing from your code. It would help if you explain what it is you want to accomplish.

Member Avatar for kRod
0
222
Member Avatar for murad.chati
Member Avatar for kRod
0
68

The End.