Search results for query: *

  • Users: PDS8475
  • Content: Threads
  • Order by date
  1. PDS8475

    Count datagridview rows where value not equal to zero

    Hi I have a datagridview which shows the results of searches. One of the datagridview columns is called price. I have a textbox showing the total of this column. But to do this I had to tell the program to put 0 in records where this field is empty. Now I want to count the records where this...
  2. PDS8475

    Resolved How to check multiple values in one record

    HI I am trying to check if a specific record exists in the database. I am Using the following code OleDbCommand check_All = new OleDbCommand("SELECT COUNT(*) FROM Donations WHERE EquipmentType = @TestType AND EquipmentMake = @TestMake AND EquipmentModel = @TestModel AND EquipmentSerial =...
  3. PDS8475

    Resolved Select where

    Hi I have the following select statement Cmd.CommandText = "Select EquipmentMake, EquipmentModel, EquipmentSerial FROM Repairs WHERE CustomerName like @Name"; but this only finds results if the Value @Name is entered exactly like it is in the database. How can I change it so the user could...
  4. PDS8475

    Help needed with tutorial

    Hi I have been trying to work through an old tutorial on printing receipts. The project has the winforms Form1, frmPrint a class called Receipt.cs and a report called rptReceipt.rdlc The Receipt class is coded using System; using System.Collections.Generic; using System.Linq; using...
  5. PDS8475

    Answered Carriage return in drawstring?

    Hi I have this line that draws the string. graphics.DrawString("*" + barcodeMake + "*" + " " + "*" + barcodeModel + "*" + "*" + barcode + "*", ofont, black, point); this works and I use it to print barcodes. But the barcodes are printed one after the other. Is there a way to put a carriage...
  6. PDS8475

    Resolved Textbox to display date one year from today

    I have a form that on load displays the date now in a text box. I also want it to display the date one year from now in another textbox but I do not know how to achieve this. Looking online I can only find examples of date now as text.
  7. PDS8475

    Answered ExecuteReader not working

    I have a database table called Sites with to columns SiteName and SiteAddress The following code is on a button click event. I have removed the database password from the connection string intentionally before posting. When I step through the code, I can see the connection state opens. However...
  8. PDS8475

    Answered Problem with output of query which is shown in a DataGridView

    Hi I have a problem with the following query "Select * FROM ItemsForSale INNER JOIN Engineering ON Engineering.Serial = ItemsForSale.Serial WHERE Engineering.Name = @s" I am using this to filter the results and it fetches the right results in the DataGridView, However the first 4 columns are...
  9. PDS8475

    Resolved Problem with query "Maximum of one result"

    I have to access Tables ItemsForSale Engineering I have a textbox Details1_textBox I am passing Details1_textBox.text to the parameter @s The Details1_textBox.text value is a name The ItemsForSale table doesn't contain a Name column How ever the Engineering table does Both tables contain a...
  10. PDS8475

    Resolved Error when dataAdaptor fills dataTable

    Hi I have a C# Form with a DataGridView (Records_dataGridView) that I am trying to fill from the access table "Donations" when the form loads. I have a dataAdaptor (DA) which fills a dataTable (DT) which is the dataSource for Records_dataGridView which can be seen in the code below private...
  11. PDS8475

    Resolved bool Wrong Data type

    Hi I'm trying to pass a bool to a table in access amongst other values. The bool is just set when the user clicks a button rather than from a checkbox. The query works if I take the bool value out. The code that I use to set and add as a parameter is: bool s = true...
  12. PDS8475

    Help with a Select statement

    Hi I have been messing around with this for two day trying to get it to work. At the moment I am getting the following rather long Exception message I ended up using a string builder program to generate the connection string and the select statement. Not that they are exactly right as I want...
  13. PDS8475

    Need help with a Connection String

    Hi I have a connection string for a access database that is reading it's path from a file. The code for the connection string and SQL query is string ConString = System.IO.File.ReadAllText("FixIT.con"); ConString = ConString.Replace(System.Environment.NewLine...
  14. PDS8475

    Resolved If form exists

    Hi I have two forms Welcome_form Repairs_form The Repairs_form has a cancel button in the click event of the cancel button I have wrote N = TempName_label.Text; Welcome_form wel = new Welcome_form(N); wel.Show(); this.Close(); Also on the...
  15. PDS8475

    Resolved Passing variables between one form and another

    Hi I have two forms Form1 Welcome Form1 has textbox called textBox2 and a button called LogIn_button Welcome has a Label called Name_label When I press the Login_button the text in textbox2 should be passed to the text of Name_label on the Welcome form However Name_label shows Welcome...
Back
Top Bottom