how do you generate source code for the automatic generation
for receipt number



how do you generate source code for the automatic generation for receipt number..

Answer / raviarsenal

C # in form load paste this code


try
{
SqlConnection con = new SqlConnection
(@"Data Source=.\sqlexpress;Initial
Catalog=Hospital;Integrated Security=True");
con.Open();
q = "select Billno from PatientBill";
SqlCommand cmd = new SqlCommand(q, con);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
bill = Convert.ToInt32(dr
["Billno"].ToString());
}
txtbillno.Text = (bill + 1).ToString();
dr.Close();
cmd.Dispose();
con.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

what are methods we have in connection pooling

1 Answers   Wipro,


Find out the roles which gives access to all tables in SAP? Thanks in advance.

0 Answers  


Tips for blog integration by www.esteemwebsolutions.com. Can Any body suggest me to how to make wonderful questions on web integration..

0 Answers  


How to call dll API sub routine in VB Form.

0 Answers  


preorder of A*(B+C)/D-G

6 Answers   BFL,






WHat is execution in manual testing and when will we start execution and what language we use in execution

0 Answers  


why we use abstract word in abstract window toolkit in java language.

0 Answers   Infosys,


What is the Super Class of Exception in java?

11 Answers   Andesa Services, Benchmark, CitiGroup, CMC, Evergent, KOT Systems, Value Labs, Vijay infoart Solutions,


EXPLAIN UNARY OPEARATORS

0 Answers  


This is the portal and portlet interview question API: is JSR 168 API Server: is ibm web sphere portal server6.0 IDE: is RAD 7.0 Question:In normal struts what is the actionservlet? Ans:org.apache.struts.action.ActionServlet. But What is the actionservlet in strutsportlet?

1 Answers   CTS, IBM,


what are other resources are needed for this mantis?

0 Answers  


what are the steps for creating prompt table dynamically for the specified field

0 Answers  


Categories