16,006,594 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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.