CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Multi column Promary key

Print topic Send  topic

Author Message
sanit kiriwong
Posted: 09/24/2004, 6:48 AM

I try to use editable grid to enter information of location of asset follow up Example Pack of codecharge - multi column primary key.But not success.My table in SQL server 2000 has below structure :
Tale Building
Bcode varchar(10)

Table floor
Bcode varchar(10) PK FK -> Link to Table building
Floorno varchar(5) PK

Table Room
Bcode varchar(10) PK FK ->link to Table floor
Floorno varchar(5) PK FK ->link to Table floor
Roomno varchar(50) PK

How I validate multi-primary of Table floor and Table Room ?

Thank in advance,

Sanit Kiriwong.
:(
klwillis


Posts: 428
Posted: 09/24/2004, 11:45 AM

SQL Server allows you to setup referencial integrity between your
tables - based on links between tables keys (and foreign keys).

Validation should be automatic. ;-)

Quote sanit kiriwong:
I try to use editable grid to enter information of location of asset follow up Example Pack of codecharge - multi column primary key.But not success.My table in SQL server 2000 has below structure :
Tale Building
Bcode varchar(10)

Table floor
Bcode varchar(10) PK FK -> Link to Table building
Floorno varchar(5) PK

Table Room
Bcode varchar(10) PK FK ->link to Table floor
Floorno varchar(5) PK FK ->link to Table floor
Roomno varchar(50) PK

How I validate multi-primary of Table floor and Table Room ?

Thank in advance,

Sanit Kiriwong.
:(

;-)
_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"

Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006
View profile  Send private message
sanit kiriwong
Posted: 10/01/2004, 10:04 AM

Hi klwillis,

Thanks for your suggession,but SQL show warning message I need to validate and show message 'Can not duplicate key' like CCS ExamplePack.

Sanit.

justman
Posted: 10/04/2004, 6:51 PM

Hi Sanit,

Could you write down what you want to achieve maybe I can help you with the SQL code in CCS. I have seen your table relationships but can't tell which data and format you would like the data to be presented. Example, Inner join, Left or right outer joins... More details would help.

Cheers,
Justman
sanit kiriwong
Posted: 10/05/2004, 9:45 AM

Hi,

Thanks,Justman.I make editable grid to input data in 3 table above.
1. Building input bcode (PK)
2. Bufloor input bcode,floorno (Multi PK)
3. Room input bcode,floorno,roomno (Multi PK)
I set foreign key bcode from table bufloor to table building and set foreign key bcode+floorno from table room to table bufloor
Example :
In table Building I can use unique properties in CCS.

In table Bufloor receive bcode from table building but user key floorno duplicate,I want to validate and show message 'Can not key the same floorno'

In table Room receive bcode and floorno from table building and Bufloor but user key roomno duplicate,I want to validate and show message 'Can not key the same roorn no.'

All table are inner join.How I code for validate in CCS.

Thans in advance,

Sanit Kiriwong.





Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.