473,409 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

autocode generate with the help of name

Expand|Select|Wrap|Line Numbers
  1. x = new OracleConnection("Data Source=cstr;Persist Security info=true;user id=dispatch;password=dispatch;unicode=true");
  2.             x.Open();
  3.             string p;
  4.             string q;
  5.             string st1 = textBox3.Text + "%";
  6.             y = new OracleCommand("select CUST_CODE from CUST_ADD where substr(CUST_NAME,0,1) like '" + st1 + "'", x);
  7.             q = y.CommandText;
  8.  
  9.             z = y.ExecuteReader();
  10.  
  11.  
  12.             int r;
  13.             y = new OracleCommand("select NVL(MAX(to_number(substr(CUST_CODE,2,3))),0)+1 from CUST_ADD where substr(CUST_CODE,0,1) like '" + st1 + "'", x);
  14.  
  15.             r = y.GetHashCode();
  16.             z = y.ExecuteReader();
  17.  
  18.  
  19.             if (z.HasRows)
  20.             {
  21.                 if (z.Read())
  22.                 {
  23.  
  24.                     if (r <= 9)
  25.                     {
  26.                         p = q + "00" + r ;
  27.                         textBox1.Text = p;
  28.                         textBox1.Text = z[0].ToString();
  29.                     }
  30.  
  31.                     else if (r <= 99)
  32.                     {
  33.                         p = q + "0" + r;
  34.                         textBox1.Text = p;
  35.                         textBox1.Text = z[0].ToString();
  36.                     }
  37.                     else
  38.                     {
  39.                         p = q + r;
  40.                         textBox1.Text = p;
  41.                         textBox1.Text = z[0].ToString();
  42.                     }
  43.  
  44.                 }
  45.  
  46.             }
  47.  
  48.             //z.Dispose();
  49.             y.Dispose();
  50.             x.Close();



PLZ SEE THIS CODE AND IF ANY ERROR THAN PLEASE HELP ME
Feb 26 '10 #1
5 1334
sashi
1,754 Expert 1GB
What is the problem that you're facing with this code?
Feb 26 '10 #2
ThatThatGuy
449 Expert 256MB
You should check it... if there are any errors.... you'll receive compiler complaints immediately.... on program compilation
Feb 26 '10 #3
semomaniz
210 Expert 100+
Please do not double post the question.

Original Post http://bytes.com/topic/c-sharp/answe...rate-help-name
Feb 26 '10 #4
tlhintoq
3,525 Expert 2GB
TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a '#' on it. More on tags. They're cool. Check'em out.
#
Feb 26 '10 #5
tlhintoq
3,525 Expert 2GB
PLZ SEE THIS CODE AND IF ANY ERROR THAN PLEASE HELP ME
So you don't even know if there is a problem? You just want other people to do your debugging for you?

When you *know* you have a problem... and you have made an actual effort of your own to resolve it... Post the relevant code along with the error message and what you have done to try to resolve it.
Feb 26 '10 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: dom | last post by:
http://www.d0m1.com/autoCodeBeta/default.asp?c=706 ae ltd is pleased to announce the autoCode beta programme: autoCode is a Windows-based integrated rapid application development environment...
2
by: grant | last post by:
Hi guys: I am try to build an online query application and would like to generate xml file like following: <survey name="Example Survey"> <question type="text" name="Title" required="yes"/>...
2
by: PeterW | last post by:
I have an xml file from which I want to generate an xsd schema and at a later stage a cs class. The xml file has a mix of defined namespaces and also an empty namespace. These are defined as...
4
by: Chris Bower | last post by:
Reposted from aspnet.buildingcontrols: Ok, I've got a bunch of derived controls that all have a property Rights of type Rights (Rights is an Enumerator). I wrote a custom TypeConverter so that I...
1
by: A Traveler | last post by:
Hello, i am having this problem. The exact error message is: "Unable to generate code for a value of type 'System.Web.UI.Page'. This error occurred while trying to generate the property value for...
8
by: Bill Rust | last post by:
I've created an "Add Item" wizard for VB.NET 2003 that allows a user to add a specialized class that works with my application framework. In the wizard, the user can select the interfaces they...
0
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional...
2
by: yanlu06 | last post by:
I tried to use HTML2FPDF to generate dynamic local files and save the generated files on the server. I don't know why it gives me the following error message: " Warning:...
2
by: bthubbard | last post by:
This may not be the best group in which to post this. If there is a better location please direct me there. I have been experimenting with Sandcastle to generate CHM help file documentation for...
5
by: Yas | last post by:
Hello, I have the following table with 4 columns.... firstname, lastname1, lastname2, EMAIL Table has user names and email, I would like to generate a 5th column called DisplayName. The email...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.