User Profile

Collapse

Profile Sidebar

Collapse
msdhh
msdhh
Last Activity: Nov 6 '12, 10:14 AM
Joined: Nov 5 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • msdhh
    started a topic I have an error syntax while creating tables

    I have an error syntax while creating tables

    Hi there,

    I have a problem when i want to create tables, I want to create three tables Company, Employee and department.
    department table has two foreign key the employee_Id and the company_Id but there is a syntax error can you please fix it.

    here is the code:-

    Code:
    CREATE TABLE Company
    (
    Company_Id int primary key not null,
    Company_Name varchar(255),
    )
    ...
    See more | Go to post

  • msdhh
    replied to How to make search based on categories
    thank you I will try that
    See more | Go to post

    Leave a comment:


  • msdhh
    replied to How to decrement an auto increment id
    thanks for the help :)
    See more | Go to post

    Leave a comment:


  • msdhh
    started a topic How to make search based on categories

    How to make search based on categories

    Hi there,
    I'm new to programming and I started learning C# three months ago so I need your help please.

    I have three tables (company,depart ment and employee).
    Company table has two rows (CompanyID, CompanyName). Department table has four rows (DeptID, DeptName, CompanyID, EmpID).
    Employee table has three rows (EmpID, EmpName, EmpAddress).

    I want to search by Departments
    For example I want...
    See more | Go to post

  • msdhh
    started a topic How to decrement an auto increment id

    How to decrement an auto increment id

    Hello there,

    I created a table called registration and I have set an auto increment ID for each record. The problem is when I delete a certain record the ID didn't remove or deleted, for example if I entered these records: - 1,Bob,Bob123,Bo b_2@hotmail.com then if I deleted it the next id record will be 2 which is supposed to be 1.

    here is the SQL Command:-

    Code:
    CREATE TABLE Registration
    (
    Reg_Id
    ...
    See more | Go to post
    Last edited by zmbd; Nov 5 '12, 01:30 PM. Reason: adding the sql command [z(Please use the <CODE/> formatting button when posting your code)]

  • thanks alot, it works :)
    See more | Go to post

    Leave a comment:


  • Here is the code source

    I appreciate your quick response,
    here is the code im using to insert the values
    Code:
    private void Save_Click(object sender, EventArgs e)
            {
                try
                {
                    sql = "insert into Registration values('" + txt_usrName + "','" + txt_pass + "','" + Txt_Name + "','" + Txt_email + "','"
    ...
    See more | Go to post

    Leave a comment:


  • System.Windows.Forms.TextBox is showing in the database.

    Hi there, Im having a problem in my sql database,
    when i enter data in the textbox called "Name" and then i save it.
    it shows in the database like this:-

    System.Windows. Forms.TextBox, Text: Bob

    How can I get rid of this

    your help is greatly appreciated
    See more | Go to post
No activity results to display
Show More
Working...