Well apparantly when i don't have a catch on that code it doesn't give any error...so I guess I'll just continue this way.
--George...
User Profile
Collapse
-
gggram2000 replied to Conversion failed when converting the varchar value 'AccNum' to data type int.in .NETYeah I did, when I said AccNum is dataType int in the database and was therefore viewing it as that on lblAccNum.text. Cheers!...Leave a comment:
-
"System.Data.DataViewManagerListItemTypeDescriptor " could not be bound
Code://When cbxInvNum is changed, it will display all fields on dgDisplay datagrid from SaleReceipts Table where invoice number = to the selected invoice number string sql = "SELECT * WHERE InvoiceNumber = " + cbxInvNum.Text; SqlCommand cmd = new SqlCommand(sql, dbConnection); cmd.CommandType = CommandType.Text; SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt);
-
gggram2000 replied to Conversion failed when converting the varchar value 'AccNum' to data type int.in .NETYeah it's much easier to understand. It worked perfect, thanks a lot for ur input! Appreciate it!
--George...Leave a comment:
-
gggram2000 replied to Conversion failed when converting the varchar value 'AccNum' to data type int.in .NETThanks, but when I try that I get this error:
"Input string was not in a correct format."...Leave a comment:
-
gggram2000 started a topic Conversion failed when converting the varchar value 'AccNum' to data type int.in .NETConversion failed when converting the varchar value 'AccNum' to data type int.
I need some help, cant figure out the error.
Code:SqlConnection dbConnection = new SqlConnection(xmldb); dbConnection.Open(); string sql = "SELECT InvStatus FROM SaleReceipts Where AccNum = '" + lblAccNum.Text + "' "; SqlCommand command = new SqlCommand(sql, dbConnection); SqlDataReader reader = command.ExecuteReader(); while (reader.Read()) { InvoiceStatus = reader[0].ToString();
-
Hey
Thanks a lot guys, all ur input really helped me. Was getting a headache for a minute and was generating a number after some equations but thanks to ur help I can randomize the five numbers fairly easy.
This is my code to get desired number:
Code:// Declare an array String[] drinkList = new String[5]; // Place some items in it drinkList[0]
Leave a comment:
-
How to randomize 5 Numbers I input?
Hi,
I'ved spent two full days trying to find a solution, I can randomize numbers between two ranges and it works fine, But my problem is when i want to randomize five numbers that I got. eg.
I randomize 1-100 and I get 50.
I randomize 1-900 on another input field and I get 578.
I randomize 2-56 and get 31.
" " and get 43.
" " and get 78.
So I have five numbers:... -
Hey just wanted say it worked great, so simple yet easy to miss...thanks a bunch!Leave a comment:
-
-
I'm sorry but I don't know how to do that, is there anything I can reference caz i cant find any example...Leave a comment:
-
Passing a variable from one form to the next
I'd like to know how I go about passing two variables from one form to the next.
For example, I can pass a variable like this:
This demonstrates how to pass a variable to a form when the form is opened.
Code:private void OpenForm_Click(object sender, System.EventArgs e) { // Get the value to be passed string parentValue = this.UserResponse.Text; // Create the child form and pass the value
-
Yeah I realized I had to create an event handler so that anytime tabpage changes it refreshes the form. Thanks for the help...Leave a comment:
-
Yeah...basicall y if I could in the designer be able to have like on change of tab evokation I would be able to like reset all values on the next tab to sort of refresh it yes....Leave a comment:
-
Question about tab control
Hi, Im using microsoft visual studio 2005 in C#.
I have an issue with a form which contains a tab control, the reason is because when i switch from tabs or move about them...there is some data that is read from the database that is supposed to be refreshed so that it displays it. But when I update a tab then move to the next tab it does not...then i try double-clicking on tabs so that I can enter code when switching between tabs... -
Yeah I tried it including the codes but still nothing happens.
this is the comment I got on the code im using:
Code:/* For a standard cash drawer, there's a physical cable that runs from the cash drawer and plugs into the receipt printer. • To open the drawer, you issue a command to the printer. The printer will send a signal to the cash drawer that kicks open the drawer. • For a standard epson receipt
Leave a comment:
-
How do I open a cash drawer? C#
Hi, I need some assistance. I'ved been searching the web for days now and can't find an example that really helps me. I have an EPSON TM-T88IV printer through which I want to open a cash drawer. I have this class in my project:
Code:using System; using System.IO; using System.Runtime.InteropServices; namespace PrintDataGrid /* For a standard cash drawer, there's a physical cable that runs
-
Thanks for the help. I finally feel comfortable with crystalreports. I searched a tutorial where it explains about the pull and push method, basically I needed a push method for my report since I was querying specific data to display. I think if I was told about those methods from the beginning I wouldn't have had any problems with crystal reports.
--GM...Leave a comment:
-
Crystal report passing parameter to a dataset from a dataAdapter
Hey, I've tried creating a dataset so that the report displays a certain data that i query. My code looks like this:
Code:// getting the dataset string connString = System.Configuration.ConfigurationSettings.AppSett ings.Get("ConnectionString"); string query = "Select * from SaleReceipts"; conn = new OleDbConnection(connString);
-
Hey, I've tried creating a dataset so that the report displays a certain data that i query. My code looks like this:
Code:// getting the dataset string connString = System.Configuration.ConfigurationSettings.AppSettings.Get("ConnectionString"); string query = "Select * from SaleReceipts"; conn = new OleDbConnection(connString);
Leave a comment:
No activity results to display
Show More
Leave a comment: