how do you generate source code for the automatic generation
for receipt number
Answer Posted / 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 View All Answers
how to study PHP my own? i reffered many sites.. but as being a fresher i couldnt follow those... which site will be the best one?
suppose we have ten members of a physical file but we want the output of last 5 members only.how to achieve that?
how CLR identify vb file?
what is the diffrence between software and hardware language?
Hello...has anyone interviewed with Information Management Services(IMS)located in Silver Spring MD??If yes,what can you share about the programming test and the analytical test?
Define distributed queries. can you explain me as soon as possible
what are the missinschema properties and should we pass primary key in select command
It is possible to take number of controls added to form at run-time.ex-when user enter 6, 6 text boxes get added to form,next time number of controls get change as per user number enter. What is code for that?
How to connect the .accdb database file of microsoft access to the Visual Basic 6.0 forms?
can we allocate memory for interface? if no then why?
Explain polymorphism. Provide an example.
How to know we are in home page of a web application using QTP
is it possible to desable particular parameter of the normal orcle report based on some condition ?????? if yes,wht is the function for desabling a parameter...
i want to insert textbox value to sql db. i have only one text box but store four values. ple give any one give sample code in asp.net c#..
can any one suggestion me present which course(except java,.net) has huge demand in the market?