|
If you don't need to do data entry then just use reports - you would not need any screens.
|
|
|
|
|
What do you mean like output results to excel, txt or PDF files???
|
|
|
|
|
No, he means something like Crystal Reports (bundled in VS2003-2008) or SQL Server Reporting Services (VS2010).
|
|
|
|
|
Ok thanks very much il do some research on them. Cheers
|
|
|
|
|
Hi,
Can anyone have the idea about how to disabling the particular oracle trigger from vb.net.
Regards,
Bluesathish
|
|
|
|
|
You drop the trigger. See the manual[^].
Bastard Programmer from Hell
|
|
|
|
|
Thanks Eddy, I knew the oracle commands to do that, i need a vb.net solution to do the same. Can u give idea for that?
|
|
|
|
|
Yes, execute the command[^] over an OracleConnection.
Sql is usally executed over a IDbConnection using a IDbCommand . Check out the link for an example on executing commands.
Bastard Programmer from Hell
|
|
|
|
|
Hi, I'm making a program from q has a code in xml I translate it and I play as a slideshow, I've been stuck at the time of painting. Pass me the following, for example I want to add a triangle, rectangle and triangle q so I stay above the rectangle, but when I paint despite having a transparent background, is not the rectangle q I have below, I need some advice or suggestions thanks
|
|
|
|
|
Can you post your "paint" code? Are you painting to a bitmap, a control?
Bastard Programmer from Hell
|
|
|
|
|
I want to create barcodes in Winforms? What do I need? Any Idea? Thx
|
|
|
|
|
What kind of barcode are you going to print? How many barcodes will be printed in your form?
|
|
|
|
|
|
Actually, I need to add Code 128 barcodes printing function in my project
|
|
|
|
|
|
This winforms barcode generator support Code 128 as well, you may try it.
|
|
|
|
|
Marked as spam
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
private void rtb_leave(object sender, EventArgs e)
{
Class1.query = rtb.Text;
}
private void InitializeComponent()
{
this.rtb = new System.Windows.Forms.RichTextBox();
this.rtb.Leave += new System.EventHandler(this.rtb_leave);
}
I have done this coding...But leave event is not working..what is the problem??
|
|
|
|
|
if this is actual code, then:
1) it is ugly (Class1 is not a good name for a class; a property should be CamelCased);
2) you can't leave a Control that isn't part of some Container (such as a Form), and hence invisible.
and if it isn't we can not help you as actual code is required.
|
|
|
|
|
thanks...somehow i managed with other logic.....
|
|
|
|
|
OdbcCommand cmd = new OdbcCommand();
try
{
cmd.Connection = cn;
cmd.CommandText = "use userdb";
cmd.ExecuteNonQuery();
cmd.CommandText = "DROP PROCEDURE IF EXISTS add_emp";
cmd.ExecuteNonQuery();
cmd.CommandText = "CREATE TABLE emp (empno INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(20), last_name VARCHAR(20), birthdate DATE)";
cmd.ExecuteNonQuery();
cmd.CommandText = "CREATE PROCEDURE add_emp(" +
"IN fname VARCHAR(20), IN lname VARCHAR(20), IN bday DATETIME)" +
"BEGIN INSERT INTO emp(first_name, last_name, birthdate) " +
"VALUES(fname, lname, DATE(bday)); END";
cmd.ExecuteNonQuery();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
cn.Close();
Console.WriteLine("Connection closed.");
try
{
Console.WriteLine("Connecting to MySQL...");
cn.Open();
cmd.Connection = cn;
cmd.CommandText = "add_emp;";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("?lname", "Jones");
cmd.Parameters["?lname"].Direction = ParameterDirection.Input;
cmd.Parameters.AddWithValue("?fname", "Tom");
cmd.Parameters["?fname"].Direction = ParameterDirection.Input;
cmd.Parameters.AddWithValue("?bday", "1940-06-07");
cmd.Parameters["?bday"].Direction = ParameterDirection.Input;
cmd.ExecuteNonQuery();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
cn.Close();
Console.WriteLine("Done.");
}
By this code procedure is created successfully bt when it comes to calling that procedure it throws an error
System.Data.Odbc.OdbcException: ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.0.77-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'add_emp' at line 1
|
|
|
|
|
If I were you, I would try to initialize my OdbcCommand object instead of just changing the command text :
OdbcCommand cmd;
string commandText;
try
{
cn.Open();
commandText = "use userdb";
cmd = new OdbcCommand(commandText, cn);
cmd.ExecuteNonQuery();
commandText = "DROP PROCEDURE IF EXISTS add_emp";
cmd = new OdbcCommand(commandText, cn);
cmd.ExecuteNonQuery();
commandText = "CREATE TABLE emp (empno INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(20), last_name VARCHAR(20), birthdate DATE)";
cmd = new OdbcCommand(commandText, cn);
cmd.ExecuteNonQuery();
commandText = "CREATE PROCEDURE add_emp(" +
"IN fname VARCHAR(20), IN lname VARCHAR(20), IN bday DATETIME) " +
"BEGIN INSERT INTO emp(first_name, last_name, birthdate) " +
"VALUES(fname, lname, DATE(bday)); END";
cmd = new OdbcCommand(commandText, cn);
cmd.ExecuteNonQuery();
}
... and so on in your second try block.
Everytime I tried to reuse a command object to do anything else than its original goal, I ran into troubles.
Initiliaze it with new and see what happens.
No memory stick has been harmed during establishment of this signature.
|
|
|
|
|
I have done it this way but nothing happened...same error still exist...
|
|
|
|
|
nitish_07 wrote: when it comes to calling that procedure it throws an error
you have shown the SP and the exception, that is fine; yet you didn't show the calling code, where the problem could well be...
|
|
|
|
|
after the last cmd.executenonquery it throws an error....
|
|
|
|