- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 103
- Posts with Upvotes
- 89
- Upvoting Members
- 52
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
- Interests
- Reading, eating, drinking
- PC Specs
- Samsung NP880Z5E 15.6-inch ATIV Book 8
Re: Hi One way to do this would be to use the SelectedRows property of the DataGridView and when it is double clicked you could pass this to your next form. For example, if I had two Forms (Form1 and Form2) and Form1 contained a DataGridView I could set it up … | |
| Re: Hi Looking at your code, I am confused as to why you are creating an SQL statement with values from your text boxes and then proceeding to add parameters to your OleDbCommand objects. Usually you would only use parameters if you were using a parameterised query such as "INSERT INTO … |
Re: Hi This is because paramSource has not been declared in the code above. Essentially, this is the value that you want to associate to the parameter, so substitute paramSource for the value that you want to provide to the parameter. HTH | |
Re: Hi Below is some code that will satisfy Task 1 (although you will need to modify to suit your needs). This is in VB.NET as you have some VB like syntax so figured it may be easier to understand. Note, this is not the final solution as it is prone … | |
Re: Hi If I understand correctly, you want to do some work on files in a directory and provide feedback via a progress bar. If that is correct, hopefully the following will help. First, add a progress bar and set its Step property to 1. This tells the progress bar how … | |
Re: Hi I tried out your code and was able to read a value from that section of the registry, but not DriverDesc as I only have ClassDesc there. The only argument I needed to change was the writeable property which I set to False as it seems that you are … | |
Re: Hi What have you tried so far? Where is your attempt? To give you a start, check out [How to Open ADO Connection and Recordset](https://support.microsoft.com/en-us/kb/168336), this will show you how to connect to a database using ADO and how to open a recordset which will contain records from the database … | |
This code snippet demonstrates how to use ADO.NET to read the contents of a Microsoft Excel Worksheet. This snippet also demonstrates the use of the [GetSchema](https://msdn.microsoft.com/en-us/library/ms135981%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396) method to determine what worksheets are available within an Excel workbook allowing the end user the ability to select a specific worksheet in order … | |
Re: Hi Not sure I fully understand the output that you are looking for. Can you provide an example of the input file and an example of what you would expect the output to be. HTH | |
Re: > Having said that, my husband considers it a disaster when a premier league game falls on the same day as an FA cup tie. I'm with him on that one, it's so inconsiderate!! > Oh and every once in a while, Chubby Brown comes to town. That made me … | |
Re: Hi Your query is joining ID columns against char columns which is incorrect (although I would have expected a different error than the one you mention). For example, INNER JOIN Client on RegisterShipmentNoDetails.**ClientID** = Client.**ClientName** is wrong, it should be RegisterShipmentNoDetails.**ClientID** = Client.**ClientID** and so on. HTH | |
Re: > Go has a goto, so that would make it a legacy language Just because a language supports goto (regardless of the arguments for or against it) does not make it a legacy language. VB.NET and C# supports goto and they are certainly not legacy languages as do many other … | |
Re: Hi The following is an example of reading an varbinary(max) field containing an image from an SQL Server table. You will need to adapt it to fit your purpose, but the example simply reads the image and displays the image in a picture box: string connectionString = @"Your connection string"; … | |
Re: Hi I copied your code as is and it works fine for me. I am assuming that you are right clicking on a link and selecting "Open in New Window" from the context menu. For me, this opens a new instance of Form1 with the page loading for the selected … | |
Re: Hi Looking at the code that you have posted and the use of aspx and aspx.vb suggests that this is a WebForms web application. There are predominately two types (Web Forms and MVC) in the .NET Web arena. Currently, it looks like you are taking the classic ASP approach (using … | |
Re: Hi You will need to register a global hot key and ideally unregister it when your program closes. Take a look at the following Win32 API functions: * [RegisterHotKey](http://allapi.mentalis.org/apilist/RegisterHotKey.shtml) * [UnregisterHotKey](http://allapi.mentalis.org/apilist/UnregisterHotKey.shtml) HTH | |
Re: Hi If I understand correctly, you are trying to grab a review directly from the model which is of type Book. This won't work as the class Book does not have a Review property. It does however have a Reviews property which is a collection, so you will need to … | |
Re: Hi How are you populating the DataGrid? If it is standard OleDb with a DataTable then you can simply issue a new query against the database using the WHERE criteria to filter returned data for the selected employee ID, populate a new DataTable and then bind that DataTable to the … | |
Re: Hi Not sure I fully understand how you want to work with the currentTime method based on your description. But in the most simple terms, you would declare a type of EWrapperImpl in your form class and then call currentTime: EWrapperImpl ewrap = new EWrapperImpl(); ewrap.currentTime(...); HTH | |
Re: Hi The MSDN documentation states that this will not compile in .NET versions 4.5.2 or greater. So, if you need to use this and have no requirement to use .NET 4.5.2 or greater then simply change your target framework to a lower version. This may not be the most suitable … | |
Re: Hi When using inline SQL you need to enclose each of your field types in the correct characters. For example, text data needs to be enclosed in ', dates (for Access) need to be enclosed with # and numbers do not need to be enclosed in anything. So in your … | |
Re: Hi It might be as simple as your controls are locked. When you select a control like a button or something, do you see a padlock icon in the upper right corner of that control? If so, right click on an empty area of the form and select "Lock Controls" … | |
Re: Hi The exception is telling you that it does not recognise the string as a valid DateTime value and that it was thrown by this file: "D:\visual studio 2010 - 20-12-2014\projects\LicensesProject\LicensesProject\UpdateMediaProduction.cs" at line 104. So, what does the code look like for this file, specifically lines 25 and 104. > … | |
Re: > AFIAK The Form constructor has no overloads. That's not strictly true, the form at the end of the day is just a class. In VB.NET, you do not see the constructor by default but if you type `Public Sub New` and hit enter you will get the following standard … | |
Re: Hi In the most simple terms, a model can be considered a table in the database. When you first create your application and your first model, EF will create the database and the table that maps to the model for you. Subsequent changes to that model (addition of a new … | |
Re: Hi What you are referring to is a mechanism known as Single sign-on (SSO). Here are a couple of articles that will hopefully explain how to accomplish what you want to achieve: [Single sign-on: Concepts, methods and frameworks](https://mauriziostorani.wordpress.com/2008/07/21/single-sign-on-sso-concepts-methods-and-frameworks/) [Building and implementing a Single sign-on solution](http://merbist.com/2012/04/04/building-and-implementing-a-single-sign-on-solution/) HTH | |
Re: Hi If you want to return data from both tables where the contents of ColumnY are the same, then you can use the following query that simply does an INNER JOIN on the two tables: SELECT dbo.TableA.ColumnY FROM dbo.TableA INNER JOIN dbo.TableB ON dbo.TableA.ColumnY = dbo.TableB.ColumnY If you only want … | |
Re: Hi In addition to deceptikon's suggestion, I just wanted to point out that if you are data binding to a DataTable then you do not need to enumerate each row and continuously update the DataSource. The following is enough to bind a DataTable to a Combo Box: comboBox1.DisplayMember = "ListVal"; … | |
Re: Hi > my program has no app.path thats why i install it on Local disk D Not sure what you mean by this, Vb6 does have an App.Path method, see the Code Changes to the App Object [here](https://msdn.microsoft.com/en-us/library/fc353bw2%28v=vs.90%29.aspx) for an example. Also, I would recommend storing this type of information … | |
Re: Hi > Now, before you say "well then insert the key", please note that I have never had to do that before This is probably because your previous models used a public property with the name ID or *classNameID* such as EmployerDetailsID. Entity Framework will discern the primary key from … |