Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limit Number Records in Table

Status
Not open for further replies.

Ferlin

Programmer
Jan 18, 2001
71
US
Hi All,

I have a Table set up in a Database in SQL2000. Is there a way under SQL2000 or Visual Basic 6 that I can limit this Table to only contain 1 record? This Table contains a Control Record and I only want 1 Control Record for my application, I do NOT want to allow anyone to add more than 1 record to this table if possible.

Any help would be greatly appreciated.

Thanks in advance.

Ferlin.
 
In VB, before issuing your INSERT INTO code, generate a recordset from this table. If there are any records returned in this recordset, do not allow the INSERT to occur.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top