|
FloatingPoint
Starting Member
1 Post |
Posted - 2008-10-20 : 08:04:17
|
| Hello,I’m real new to database and SQL Server 2005 and I’m having problems getting two tables two work together; Sites and Contacts see below. I’m using Visual Studio 2008 (VB.NET) and ASPxGridView from Developer Express.INSERT INTO [stinkit2].[dbo].[Contacts] ([SitesID] ,[FName] ,[LName] ,[Phone] ,[Pager] ,[CellPhone] ,[TLA] ,[AFN] ,[FN]) VALUES (<SitesID, int,> ,<FName, varchar(25),> ,<LName, varchar(25),> ,<Phone, varchar(12),> ,<Pager, varchar(12),> ,<CellPhone, varchar(12),> ,<TLA, varchar(2),> ,<AFN, nvarchar(3),> ,<FN, nvarchar(2),>)The SitesID is the PK in the Sites Table and SitesID is the FK in the Contacts table. However, the (FN) field is the field that each table is called by. Meaning the table Sites(FN) would have a FN number value, say 80 and the Contacts that are FN 80 would match when you select Sites FN 80, therefore all of the contacts for Sites FN would match.Any idea what I'm doing wrong? Thanks. |
|