Click here to Skip to main content
15,888,335 members

Comments by DaveP62 (Top 4 by date)

DaveP62 28-Feb-13 10:55am View    
I'm using a more recent version of Visual Studio. There must be some differences in visual studio 2005 that I am not aware of. Sorry I won't be able to help any further.
DaveP62 19-Dec-12 13:03pm View    
Still not sure what you are trying to do. Can you provide the following scripts?

1 - Script to create table E1 as it is now

2 - Script to create table E2 as it is now

3 - Script that causes your problem "Primary key does not exist the the table E1 and it is not null".
DaveP62 19-Dec-12 9:29am View    
Hello, more information is needed to provide a solution.
What are the data types for the two Primary Key fields in E1?
Are you trying to use a single column in E2 as a Foreign Key to the two Primary Key fields in E1?
This may not be possible. You may have to have two fields in E2 of the same data types as the two Primary Key fields in E1 and then make two Foreign Key references.
DaveP62 25-Sep-12 8:58am View    
Based upon the requirements given it doesn't seem like the table needs a lot of fields. Assuming the application will be as simple as the requirements suggest the following fields should work:
MessageId (Integer) -- Identity field auto-incremented
FromUser (VarChar(64)) -- The name of the user sending the message
ToUser (VarChar(64)) -- The name of the user who will receive the message
MessageText (VarChar(2048)) -- The message being sent
Received (bit) -- Default = 0

You can add as many other fields as you like depending on how you use and how much functionality you want the application to have.