I m a new bee i have used sql server 2000 before my question is when creating two tables in sql server 2000 say location and projects table projects having a foreign key referencing the location table when inserting values in location the projects is also updated thats is no need to insert the similar value in the foreign key in projects table why is it not possible in mysql when i insert values in location using insert command and when using select command on projects it does not shows the value in foreign key please check the below code mysql> create table location( -> id int not null, -> primary key(id)) -> engine=innodb; Query OK, 0 rows affected (0.11 sec) mysql> create table projects( -> id int, -> location_id int, -> foreign key(location_id) references location(id) on update cascade on del ete cascade) -> engine=innodb; Query OK, 0 rows affected (0.31 sec) mysql> insert into location values('1') Query OK, 1 row affected (0.34 sec) mysql> select * from location; +----+ | id | +----+ | 1 | +----+ 1 row in set (0.00 sec) mysql> select * from projects; Empty set (0.00 sec) as u see in the above code it was possible in sql server 2000 that the value was reflected in the child table why is it not possible in MySql Why should the value be insert in both the tables isn't it possible in MySql that when i insert in the location table the projects table pick the value automatically and show it in select Query when i query the projects table
sajid salim khan
Posts
-
MySql Foreign key referencing -
MySql Foreign keyI m a new bee in mysql i have used sql server 2000 before my question is when creating two tables in sql server 2000 say location and projects table projects having a foreign key referencing the location table when inserting values in location the projects is also updated thats is no need to insert the similar value in the foreign key in projects table why is it not possible in mysql when i insert values in location using insert command and when using select command on projects it does not shows the value in foreign key why should the value be insert in both the tables isn't it possible that when i insert in the location table the projects table pick the value automatically and show it in select result when i query the projects table
-
How to Construct the Sidebar Menu Like the one at the left in the Codeprojecti am new in web development my question is how to construct a side bar just like the one at the left of this website that is when i click on web development it drops down and shows the categories under web development please note i am using CSS HTML and PHP
-
Maximize Problem in MDI Form.Dear go to properties and turn off the maximize button regards sajid salim khan :rose:
-
Design and Display IssueDear All I am Beginner the problem is that i am designing an application when i am running the application the task bar is hidden while the application is active how shall i want the application just like word or excel that when running the task bar is not hidden Regards Sajid Salim khan :rose:
-
convert from MSAccess to Oraclei want to program it from oracle then any good article
-
convert from MSAccess to Oraclethe problem is that i have a huge database builtin MS Access due to such burden i want to Convert To Oracle is it Possible to Convert Whole DataBase to Oracle
-
solution for primary keyThe problem is that i have a primary key whose dbtype is Bigint i dont want to keep auto to generate the primary key in sql2000 table by code and return that value. Then when entering next record increment must be made to the previous number and inserted as a primary key next question is if i delete any resord then how to sort the primary keys in ascending order sas
-
Combo box Foriegn key problemThanx I will try It SAS
-
Combo box Foriegn key problemguys third time posting the question but in vain i have a table Employee Info in sql 2000 having attributes EmpID EmpName GenID GenID is a foriegn key of table Gender having attributes GenID and Gender this.cGender.displaymember = "Gender"; till here every thing is okay but here the problem arises the following code is not working why {this.cGender.valuemember = "GenID";} i need this code to run bcoz i have to save the value of gender in the Employeeinfo accoridng to following code datrow.["EmpID"]= Emp.text; datrow.["EmpName"]= EmpName.text; datrow.["GenID"]= cGender.SelectedValue; sas
-
Combo Box.ValueMember Problemthe situation is that i have a table Employee info having attributes EmpId EmpName GenID the gender attribute is bieng filled by another table having 2 attribuites GenID and gender i.e GenID is a foriegn key in the Employee info table now when filling the table from a winform i loaded the data in the combo box of gender in form load event but the value member is giving error bcoz i have to select the field from gender and must be saved in the Employee info table sas
-
Combo Box.ValueMember Problemthe problem is in form load event i kept the filling of the combobox named Gender from SQL tables it is giving error in the following line this.cGender.valuemember = "GenID"; (the value not found blah blah) why it is doing so sas
-
filling and retrieving tablessir the problem is i am working on a HR database u have worked on web forms the application consists of 4 forms every form is associated with two tables in sql2000 the question is that when the user open the application in the form load event i kept the dataset filling method for the first table now when user switch on to the next table what will be the event to load the second datatable in the datset sas
-
filling and retrieving tablesi have to fill SQl 2000 tables from window forms the problem is when filling the 1st table i load the database table in a datset in the form load event now when filling the second table what will be the possible event to fire that it load the second table in the datset sas
-
combo+sql+C#the Pronblem is i have a table of employeeinfo having attribuyes EmpID EmpName EmpFatherName GenID now GenID is a primary key of a separate table having two attributes that is GenID Gender the problem is when the form runs displaying 3 textboxes and one combobox the user must select the entry from gender and click save the values must be stored in the table of sql that is Employeeinfo i saved the first three attributes by the following code datarow.["EmpID"] = EmpID.text; but on GenID it gives problem bcoz i want to relate the Gender attribute to the GenID Attribute in the EmployeeInfo table and must be saved in the sql data table SAS
-
combo+sql+C#the Pronblem is i have a table of employeeinfo having attribuyes EmpID EmpName EmpFatherName GenID now GenID is a primary key of a separate table having two attributes that is GenID Gender the problem is when the form runs displaying 3 textboxes and one combobox the user must select the entry from gender and click save the values must be stored in the table of sql that is Employeeinfo i saved the first three attributes by the following code datarow.["EmpID"] = EmpID.text; but on GenID it gives problem bcoz i want to relate the Gender attribute to the GenID Attribute in the EmployeeInfo table and must be saved in the sql data table
-
Sql Table Foriegn Key Problem in C#the Pronblem is i have a table of employeeinfo having attribuyes EmpID EmpName EmpFatherName GenID now GenID is a primary key of a separate table having two attributes that is GenID Gender the problem is when the form runs displaying 3 textboxes and one combobox the user must select the entry from gender and click save the values must be stored in the table of sql that is Employeeinfo i saved the first three attributes by the following code datarow.["EmpID"] = EmpID.text; but on GenID it gives problem bcoz i want to relate the Gender attribute to the GenID Attribute in the EmployeeInfo table and must be saved in the sql data table sas
-
delete primary keyi have a table EmployeeInfo in sql 2000 that have two attributes say EmpID & EmpName i am displaying the EmpName only in a datagridview but when i delete it it give error that cannot delete the key blah blah so how to delete the whole row from sql2000 please note that i am only displaying the EmpName in the data grid sas
-
resolution problemi havetwo PCs one with resolution 800*600 and second Pc with resolution 1024*768 i have made a windowform where i place a groupbox full of controls the problem is this that when i run that application on 800*600 pixels PC the controls are displayed as the were placed on the form but when i run it on the PC with 1024*768 resolution the controls are squeezed on the form leavingl ot of space empty on the form how to over come this problem sas
-
Setup Questioni have made a small program i want to make a setupo f that i had also created login id so how to create a setup sas