229 Posted Topics
![]() | Re: Hi Are you sure that the path to the files is correct? Have you tried to step through the code and see if you are even entering the block of code that determines if the directory exists? My thoughts are that it does not as I have tested your scenario … |
Re: I second Ubuntu. I love it as an OS and it works very well on older hardware. If you are after aesthetics then an air. The thing I found however is that the cost of Macs v Laptops is very big with Macs (obviously) being the more expensive. | |
Re: Hi I haven't used Oracle so this may not be correct, but you might be able to use something like the following: `INSERT INTO t1 (c2, c3, c4) SELECT c2, c3, c4 FROM t2` You might need to tweak it a bit. HTH | |
Re: Hi It sounds like you have the View property of your ListView set to LargeIcons or one of the icon views. Change this property to List and each item will be placed below when the button is pressed. Also, you do not need to use the ListViewItem to add items … | |
Re: Hi In what context are you getting this error? Is it an SQL error? | |
Re: Hi I haven't looked all through your code and may be wrong but you mention doing SUM, MAX and MIN on the data. Can I suggest you use ADO.NET for this, much better than using COM for this scenario. This snippet (https://www.daniweb.com/software-development/csharp/code/492766/display-excel-data-in-a-datagridview) shows how to do a basic SQL select … | |
Re: > And why this 'Name' at the end? Isn't that just a label? That is part of the [String.Format](https://msdn.microsoft.com/en-us/library/system.string.format%28v=vs.110%29.aspx) method. The {0} is the placeholder and the variable Name contains the value so that the full string becomes "~/thankyou.aspx?yourname=whatever_the_name_variable_holds" | |
Re: Hi If you want to display two columns of data and assuming this is a Windows Forms application then maybe using the ListView control would be a better approach. HTH | |
Re: Hi What code have you got so far? Show us that and we can help you to break the problem down. To get you started (if you haven't already), look at using the [StreamReader](https://msdn.microsoft.com/en-us/library/system.io.streamreader%28v=vs.110%29.aspx) to read your text file. Then the [String.Split](https://msdn.microsoft.com/en-us/library/system.string.split%28v=vs.110%29.aspx) method to read each number for a line. … | |
Re: Hi Assuming you are using VB.NET as you have posted this in the Visual Basic old forum then you can use the [My.Computer.Audio](https://msdn.microsoft.com/en-us/library/081ed2x7.aspx) object to play sound. HTH | |
This snippet demonstrates how you can add VBA code to an Excel file at run time. **Prerequisites** In this snippet I am using Microsoft Excel 2013 with the Microsoft Excel 15.0 object library. Before you can use this code, you will have to change a setting within Microsoft Excel to … | |
Re: Also, you date should be enclosed in # characters and your text in ' characters, so `INSERT INTO SAMPLE (DOJ,DESIGNATION)VALUES(#" & DATETIMEPICKER1.VALUE &"#,'"&COMBOBOX1.TEXT&"')"` Or better yet, use parameterised queries: cmd=new oledbcommand(INSERT INTO SAMPLE (DOJ,DESIGNATION)VALUES(?, ?)",CON) cmd.Parameters.AddWithValue("?", YourDatePicker) cmd.Parameters.AddWithValue("?", YourComboBox) cmd.ExecuteNonQuery() to avoid the need to enclose field values in special … | |
Re: Well, I'm not a rugby fan (although slowly getting into it), but my drinking buddy is. He is an ex rugby player (and sports the looks), Irish to boot and I'm going to watch the game with him tomorrow, it's gonna be messy, much alcohol will be consumed :) | |
Re: Hi I tried your script, first time I had to omit the DROP EliteShop statement as that did not exist (of course) and it ran fine. I then put the DROP EliteShop back in and ran the statement and again, it ran fine. I am running SQL Server 2014. I … | |
Re: Hi Does your Checmical, SupplierTable, OrderTable and ChecmicalUsage tables all have the same table definition? That is, do they all contain the same fields? If so, you should use a UNION query to combine all of the data from the multiple tables into one return table. Something like: SELECT * … | |
Re: Hi > can you please debugg it for me thank you :D have a nice day We won't be able to debug it for you as we don't have your code or the database. However, looking at the field name Mem_ID would suggest that this is a numeric field, is … | |
Re: Hi You can use GetRef to do this, for example: Dim arrMySubs(3) arrMySubs(1) = "Sub1" arrMySubs(2) = "Sub2" arrMySubs(3) = "Sub3" Dim count count = 3 Dim f 'Function variable Set f = GetRef(arrMySubs(count)) f Sub Sub1() MsgBox "Hello from Sub1" End Sub Sub Sub21() MsgBox "Hello from Sub2" End … | |
![]() | Re: I'm a .NET guy so my primary OS has to be Windows, but I've been using Ubuntu as my main system for the last year and I love it. I have NetBeans installed for learning Java, and the Python stuff is great (still learning the basics). I use VMware player … ![]() |
Re: Hi There is probably a more elegant solution (I'm no JS expert), but the following provides the output that you mention: var myString = '[null,null,null],["Paul","2293",1],["eric","2099",0]'; //Get first set of data var set1 = myString.substring(myString.indexOf("[") + 1, myString.indexOf("]")).split(","); //Remove set1 from myString myString = myString.replace('[' + set1 +'],', ''); //Get second … | |
Re: Hi You can check your query string parameter to see if it matches one of the items in the list that is about to be appended to the StringBuilder and if it is, add the class attribute. The following is an example that I created based on your concept, but … | |
Re: Hi Why would you want to do this? To what purpose? It is generally bad practice to stop the user from being able to control their own machine. Also, this type of code can be used for malicious purposes (not suggesting that is your intent) and if given the solution, … | |
Re: Hi I haven't used the GridView Caption property before but I am assuming that this adds some form of title to the GridView which could span the number of columns? Is that correct? If so, adding this data to a CSV file would break the structure as it is not … | |
Re: Hi How are you trying to connect to the database? Is it DAO, ADO? What version? Also, what version of Access did you use to create the database? | |
Re: Hi Are you sure it is stating Object Reference Not Set as I would expect it to throw an System.ArgumentOutOfRangeException. The reason being is that you are loop through each row of the DataTable via an Integer index (so always 1 - 12 in your example), but each time you … | |
Re: Hi Can you post the code that you are currently using? Usually, if you are just looking to grab some data I would recommend using an [OleDbDataReader](https://msdn.microsoft.com/en-us/library/system.data.oledb.oledbdatareader%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396) which can be implemented along the lines of: Dim connectionString As String = "Your connection string" Dim connection As New OleDbConnection(connectionString) Dim command … | |
Re: Hi I don't belive the input box supports this. You could however create a form that has a text box on it with it's PasswordChar property set and use this in place of the input box. HTH | |
Re: Hi It looks like your WHERE criteria contains a value with an apostraphe so your SQL statement is breaking as the criteria itself needs to be enclosed within apostraphes. You can either use parameterised queries or escape your search criteria. For example `"SELECT * from tblbooks where " & cmbsearchbook … | |
Re: Hi It would help if you could clarify what you mean by providing as much information as possible. I'm going to assume that you mean that you want to ask the user if they want to delete and if they say yes then you do the delete. If this is … | |
Re: Hi Your field name should be enclosed in square brackets as it contains a space: `.Findfirst "[ACCOUNT NO] LIKE '" & searchvar & "*'"` HTH | |
Re: Hi What is datasource and how is it populated? The first thing that springs to mind is that you are not checking if the page is posted back so you are always recreating the GridView. Add a check for postback before applying that code: If(!Page.IsPostBack) { //your code here } … | |
Re: Hi That link points back to this page so not sure which tutorial you are currently following. In terms of what is a stored procedure, it is simply a prepared SQL statement that can be executed multiple times. For example, imagine that you have a table storing contact information (ID, … | |
Re: Hi This error usually indicates that your partial class is not named correctly for some reason. Usually, when you have a web form there are two files: Default.aspx - this is your designer file that contains the HTML etc. Default.aspx.vb -this is your code behind file that contains your server … | |
Re: Hi If you are new to .NET then I would recommend that you first start by learning the basics of the Framework and the VB.NET language before diving into creating a web application with databases. Having said that however, if you are do jump straight into it then I would … | |
Re: Hi Can you provide your table structures and an example of the data in each. It would make modifying your SQL statement a lot simpler and thus being able to help you a lot easier. | |
Re: Hi I don't quite understand. If your database is deleted and you don't have a backup then your out of luck. There is no magic software solution that will get it back. Well, there is if you want to discuss data recovery tools etc. but I don't believe that is … | |
Re: Hi The reason for the syntax error is that you have not surrounded any of your values with the correct tokens. By that I mean that a string value must be surrounded by an apostraphe, a date (in Access) with a # character and numerics with nothing. So for example … | |
Re: I doubt the OP is even watching this thread considering he hasn't posted for a couple of years :) | |
Re: Hi I think you may be approaching this in slightly the wrong way. Instead of looking to have the addItem form communicate with the invMain form, you really want to have the invMain form ask the addItem form for it's data. For example, add the following three properties to your … | |
Re: Hi Why would you want to avoid a default statement? Do you have some code to demonstrate what you mean and why you would want to do this? One way of avoiding a default statement in a switch is to simply not have one. What result that will have on … | |
Re: Same reply as [your double post](https://www.daniweb.com/community-center/threads/492770/lock-screen-) | |
Re: Is this in relation to your [research lab program question](https://www.daniweb.com/software-development/vbnet/threads/492768/disable-alt-tab-help)? We can't give code to do this type of stuff. For this specific scenario, I assume both computers are on the same network and mom owns the PC's. Get Mom to remote desktop into sons computer then she has control … | |
Re: Hi Wow, several hours to load, how big is this file? If you only need to import it once but reuse it as and when, have you considered using a database. This would be a lot more performant than working with an XML file, especially a very large one. If … | |
Re: Hi It is still somewhat unclear as to what you want to do. I think you are asking how to update variables in your main program with the results from methods in your class called Class? Is that correct? Can I make a constructive suggestion, don't name your classes Class, … | |
Re: Hi You would probably need to use the AddRange method to add to the ArrayList. However, why use an ArrayList when you could use a StringCollection for this. For example, change your ButtonValues type to `System.Collections.Specialized.StringCollection` in your properties and then add the following to your Form Load event: If … | |
Re: Hi What is the actual error that you get? Also, you might want to consider using ADO.NET to do this which would remove the dependency on using the Excel Interop libraries. I can provide an example if that is of interest to you. | |
Re: Hi The reason for the error "myBikeList does not exist in the current context" is a matter of scope. At the moment, you have declared the myBikeList variable within the foreach loop, once that loop is completed, the myBikeList variable will be out of scope so not available to code … | |
Re: Hi What are you trying to do? What code other than `string imgloc="";` do you have? If you are tyring to update a database record but don't have an image then use DBNull if your field accepts nulls. Otherwise, please provide more information. | |
Re: Hi What have you done so far? Where are you stuck? We are happy to assist, but not to do the project for you. | |
Re: Hi Have a look at the [SelectionFont](https://msdn.microsoft.com/en-us/library/system.windows.forms.richtextbox.selectionfont(v=vs.110).aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-2) property, this will allow you to set the font to bold for either the selected text, or any text after the insertion point. HTH | |
Re: Hi You would probably need to use a number of Win32 API's to achieve this, such as [PostMessage](https://msdn.microsoft.com/en-us/library/windows/desktop/ms644944%28v=vs.85%29.aspx). This would require that you knew the handle of the window you wanted to post data too which can be done using [FindWindow](https://msdn.microsoft.com/en-us/library/windows/desktop/ms633499%28v=vs.85%29.aspx). I did come across a Code Project article that … |
The End.