602 Posted Topics
Re: Hi, How are you initially populating the datagrid? Are you using a [DataAdapter](http://msdn.microsoft.com/en-us/library/System.Data.Common.DataAdapter(v=vs.110).aspx)? If so you can specify the [Update](http://msdn.microsoft.com/en-us/library/system.data.common.dataadapter.update(v=vs.110).aspx) method for it as shown on the link I have provided. As for your code, because you are "firing off" the command with an execute non query and then changing … | |
Re: hi, You could see if the listitem is already contained within the second Listview with the [Contains method](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.contains(v=vs.110).aspx). Failing that, you would loop through each item in the second Listview item and compare to the item you wish to add. If you do not find a match, then add it. | |
Re: Hi, It is this line here: `currrentRow = lv2T1.Items.Count()` As Scudzilla said in VB you have zero based indexes but count will give you the count of items i.e. In your list item, if you have 25 items the count will return 25 but the index of the last item … | |
Re: DIIIIIIIIIIIIIEEEEEEEEEEE! Because it is the start to Lawnmower Deth's Thrash metal version of the Osmond's Crazy Horses... and I'm a bit odd like that... | |
Re: Hi Create an array like so: dim NumberToText as String = new String() {"zero", "one", "two", & _ "three", "four", "five", "six","seven", "eight", "nine"} Then parse through your input one character at a time. Each character will be a number whose value corresponds to the index in the array where … | |
Re: Hi I think you are looking to use [textbox autocomplete](http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.autocompletemode(v=vs.110).aspx) which will be using your gird as it datasource and then you could select the matching row... | |
Re: `dim inquirybyyearmonthday(20)()() as byte` So to clarify further.... an array that contains 20 arrays of undetermined length that themselves contain arrays of undetermined length... of type byte | |
Re: You could also use `e.handled=true` just to add to the fire... | |
Re: Hi, You would need to catch the cell using the [DataGridViewCell Class](http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell(v=vs.110).aspx) and then the [DataGridViewCell.Style Property](http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell.style(v=vs.110).aspx) to alter the style for that cell. | |
Re: Hi [This is an example from Microsoft](http://msdn.microsoft.com/en-us/library/s9kdkks3.aspx) | |
Re: Hi, I'd say you need to use the System.IO object to get the [DirectoryInfo](http://msdn.microsoft.com/en-us/library/system.io.directoryinfo(v=vs.110).aspx) of any folders and the[ FileAttributes](http://msdn.microsoft.com/en-us/library/system.io.fileattributes(v=vs.110).aspx) of any files selected. Sub DirectorySelected (ByVal DirectoryPath) Dim SubFolderCount, FileCount as integer dim LastAccess as Date Dim di As New DirectoryInfo(DirectoryPath) FileCount = di.GetFiles().Length SubFolderCount = di.GetDirectories().Length LastAccess = … | |
Re: Hi, did you specify an INSERT command for your [DataAdapter](http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldataadapter.insertcommand(v=vs.110).aspx) (can't see it in your code sample) | |
Re: Hi Reading your example, `this = that.theother(something)` I would take that to mean `variable = <Class or Namespace>.<Function>(Parameters)` where `variable` is some sort of variable of a type e.g. Integer, Object, Decimal, Boolean etc. The Class or Namespace contains a function that returns a value of the same type as … | |
![]() | Re: Hi, Yes `e.handled = true` will stop the character. |
Re: Hi, I don't see where you are removing items from your collection. I only see you adding and removing from your listbox. | |
Re: Wow! Thats a lot of Code to go through! So I'll just go back to your question... You have a list of items and for each item you want to give total in stock and cash value. OK there are two ways to do this: 1.Through a SQL query using … | |
Re: Hi, Do you have Excel installed on the machine? and if so, is it a version later than 2003? i.e. 2007 onwards to handle xlsx files? Or could something have changed the file associations? Also you are opening the file by interop when you get the error not as a … | |
Re: Hi, You want to select an item when the user selects the item and presses enter? But the user has just selected the item? Looking at your code, it would appear you want the item to perform an action when the user hits enter and you may want other events … | |
Re: Hi, You would run your insert on your table as normal passing the foreign key in as a value. For instance, to use your patient example, I want to record a visit by a patient with an ID of 1 to the doctor with an id of 2... `INSERT INTO … | |
Re: dim NewForm as new form2 NewForm.TextBox1.Text = "My Text" NewForm.Show | |
Re: Hi, You should check that Dir1.path is not equal to the App.path, are you having an issue with the code? | |
Re: Hi, If you look at Interop it should help. Here is a [tutorial](https://support.microsoft.com/kb/316383) | |
Re: You could try setting up a scheduled task to run a script to check if the conditions you are looking for are met and if so run your program. | |
Re: " The target file 'C:\example' is a directory, not a file." you should do something like this: Sub CopyFile(ByRef SourceFile as String, ByRef DestinationPath as string, Optional ByVal OverWrite as boolean = false) dim FileName as String dim ExtnPoint, Indx as integer dim FilePath as string if instrRev(SourceFile, "\") = … | |
Re: Hi Use the [GetFileName](http://msdn.microsoft.com/en-us/library/system.io.path.getfilename(v=vs.110).aspx) function of Path: Public Sub Scan() Dim ScanFolder as string ScanFolder = Directory.GetFiles("C:\examplefolder\", "." , SearchOption.AllDirectories.GetHashCode) for each dFile as String in ScanFolder ListBox1.Items.Add(System.IO.Path.GetFileName(dFile)) next End Sub Also, you seem to be confusing Function with Sub. The simplest way to remember the difference is that in … | |
Re: DataGridView1.Rows.Clear() will clear the rows for you. If you want to completely clear everything from the grid you could then add DataGirdView1.Columns.Clear() to clear the columns as well. | |
Re: Hi, I'd use an [XMLReader](http://msdn.microsoft.com/en-us/library/cc189056(v=vs.95).aspx) to parse the XML and output in whatever format you wish: Function PrintReport(byref XMLString as String) as String dim OutPut as String ' Create an XmlReader Using reader As XmlReader = XmlReader.Create(New StringReader(xmlString)) 'You want to get the XML in the "a" tag reader.ReadToFollowing("a") While … | |
Re: Hi, Does Access support binary data? If it does, [This link here is an example of doing it with MS SQL Server](http://net-informations.com/vbprj/dataset/insert-image.htm) If not, SQL Server Express is free and will support it. | |
Re: I have another suggestion which could be easier for you. Leave your main form open, but open each of the other forms using the [showdialog method](http://msdn.microsoft.com/en-us/library/c7ykbedk(v=vs.110).aspx). This will open each form as a modal dialog box in front of your main form and will prevent the user interacting with any … | |
Re: Hi, I still occasionally have to maintain some classic ASP 3.0 sites I made the leap from ASP to ASP.Net in the early 2000's I've also done at bit of PHP as well I found it easier to learn VB.NET and go to making ASP.Net Pages with a VB.NET backend … | |
Re: Hi, is the field `Renter_ID` in the database definately a string type? and not a numeric type? The reason I ask is that you say the error occurs when you fill your adaptor i.e. when you execute the query. | |
![]() | Re: Christmas is all a matter of perspective, for instance, for me Christmas is December 25th but it does actually not fall on Christs birthday (As Diafol pointed out, it was a part of a p.r. campaign by the early Christian church in the west to put it on the same … |
Re: hi do you specify names for the textboxes i.e. something like this: sub CreateTextboxes() dim i as integer =0 dim txtbox as textbox do while i < 5 txtbox = new textbox txtbox.name = "TxtBox" & i '.... i = i + 1 wend end sub If so you should … | |
Re: Hi Post some of your code and we can see where it is going wrong... | |
Re: You could `JOIN` the tables using [SQL Joins](http://www.w3schools.com/sql/sql_join.asp) in your query... | |
Re: The Porsche they were driving actually produces more power than an 1980's F1 car. Also, unlike most modern cars the GT4 is primarily built for the track not the street and as such has many of the features that most drivers take for granted traction control, Electronic stablity programs etc. … | |
Re: @jwenting One man’s terrorist is another man’s freedom fighter - Black and coloured people were terrorised in South Africa every day by the Police and the Army - they were second class citizens. A black man or woman was liable to being arrested and beaten by the Police. School children … | |
Re: Book mark the following link [www.connectionstrings.com](http://www.connectionstrings.com) It will explain and show all the different types of connections strings for you. | |
Re: Hi, Your query is soo complex that the connection string is probably timing out. If you run that query in SQL (not through code but Management Studio,) how long does it take? BTW you're missing a closing bracket. | |
Re: Nostalgic waves are sweeping over me.... My first console was I think called a GrandStand something or other - we are talking around about 1984 - it came with three or four games, a "gun" and two built-in controllers it played a shooting game, Tennis (Pong clone) and football (pong … | |
Re: Hi, Have you attempted any of this yourself? Where is your code and what errors did you get? 1. Use System.IO to browse the folder 2. Use a menubar with the buttons linked to the shortcuts to "navigate" | |
Re: I have visual studio 2013 and 2012 and 2010 and I'd much rather develop in 2010. Hate the dull horrible interface THAT SHOUTS AT ME all the time in 2012 and 2013.I know they have new features, support .NET 4.5 etc. but as a working environment that new interface would … | |
Re: I just spotted another legal hole in the "contract" if a person is not legally allowed to appear in these photos due to being under the age of consent then surely they are not legally allowed to give their consent for them to be used or legally allowed to consent … | |
Re: Hi, I assume that your debugging msgbox shows there are row in the datatable, have you tried setting the crystal reports datasource directly to the datatable instead of using a "testreport" (which is some sort of class?)? | |
Re: Not straight off the bat, if you put a watch on the dataview you should then be able to see a count of the rows and columns... Then add a quick watch for each row / column combo... i.e. dataview.Rows(0).Column(0).value | |
Re: Hi, Maybe explain the holt winters forecasting method? Is it a formula or a set of actions to be carried out? | |
Re: Hi, Did you specify the [Update, Insert, and Delete commands](http://msdn.microsoft.com/en-us/library/tf579hcz(v=vs.110).aspx) for your dataadapter to use with the [Update method](http://msdn.microsoft.com/en-us/library/system.data.common.dataadapter.update(v=vs.110).aspx) | |
Re: Hi, It could be any process that has the file open - tell me, by any chance did you run through a debug on this process before that opened the file but exited the process before it had a chance to close it? In which case it could be your … | |
![]() | Re: The good old local traditional Fish and Chip shop! But not too often! When out after an evening drinking in Dublin (again not too often especially nowadays,) I tend to find myself in Zaytoon - it's an authentic kebab place everything is freshly made in store - they even have … |
Re: Hi, Put a break point in where you generate your sql query and a watch on the SQL query. Now copy the query text into Access querybuilder in SQL mode - Run the query in Access - does it work? Also does Access Edit/change your query? |
The End.