Why won't this RS allow to add new record 
Author Message
 Why won't this RS allow to add new record

Would any one please take a look at this recordset and tell me why
won't it let me add new records ?? It is fed to a SSDBGRID when click
new record on the grid tells me "column is not updateble" but it allow
me to edit the records.

I appreciate any help, here is the recordset:

Data1.RecordSource = "SELECT tblMarines.MarineID,
Marine_PFT.PfT_Score,Marine_PFT.Qual_date as [PFT Date:] ,
tblMarines.Lastname as [Last Name:], tblMarines.fname as [First
Name:]," & _
   " Marine_PFT.Pull_ups as [Pullups:]," & _
   " Marine_PFT.run_time as [Run Time:]," & _
   "Marine_PFT.Crunches, Marine_PFT.Body_Weight as [Body Weight:]," &
_
   "Marine_PFT.Fat_Percent as [Fat %], tblWorkSection.Platoon_ID as
[Platoon ID] " & _
   "From (tblMarines INNER JOIN Marine_PFT ON tblMarines.MarineID =
Marine_PFT.MarineID)" & _
   " INNER JOIN tblWorkSection on tblMarines.platoon_code =
tblWorksection.Platoon_ID" & _
   " WHERE Marine_PFT.qual_date = (Select Max(qual_date) from
Marine_PFT " & _
   " Where Marine_PFT.MarineID = tblMarines.MarineID) and " & _
   " tblWorkSection.Platoon_ID = " & QuickRef.SectionID & "" & _
   " ORDER BY Marine_PFT.Qual_date DESC"



Thu, 13 May 2004 19:27:59 GMT  
 Why won't this RS allow to add new record
Is there any property called "allow add new" or something like that at
the SSDBGRID you must to set to True?

Regards
BD


Quote:
>Would any one please take a look at this recordset and tell me why
>won't it let me add new records ?? It is fed to a SSDBGRID when click
>new record on the grid tells me "column is not updateble" but it allow
>me to edit the records.

>I appreciate any help, here is the recordset:

>Data1.RecordSource = "SELECT tblMarines.MarineID,
>Marine_PFT.PfT_Score,Marine_PFT.Qual_date as [PFT Date:] ,
>tblMarines.Lastname as [Last Name:], tblMarines.fname as [First
>Name:]," & _
>   " Marine_PFT.Pull_ups as [Pullups:]," & _
>   " Marine_PFT.run_time as [Run Time:]," & _
>   "Marine_PFT.Crunches, Marine_PFT.Body_Weight as [Body Weight:]," &
>_
>   "Marine_PFT.Fat_Percent as [Fat %], tblWorkSection.Platoon_ID as
>[Platoon ID] " & _
>   "From (tblMarines INNER JOIN Marine_PFT ON tblMarines.MarineID =
>Marine_PFT.MarineID)" & _
>   " INNER JOIN tblWorkSection on tblMarines.platoon_code =
>tblWorksection.Platoon_ID" & _
>   " WHERE Marine_PFT.qual_date = (Select Max(qual_date) from
>Marine_PFT " & _
>   " Where Marine_PFT.MarineID = tblMarines.MarineID) and " & _
>   " tblWorkSection.Platoon_ID = " & QuickRef.SectionID & "" & _
>   " ORDER BY Marine_PFT.Qual_date DESC"



Thu, 13 May 2004 20:59:39 GMT  
 Why won't this RS allow to add new record
You cannot update a recordset derived from more than one table.
John
Quote:

>Would any one please take a look at this recordset and tell me why
>won't it let me add new records ?? It is fed to a SSDBGRID when click
>new record on the grid tells me "column is not updateble" but it allow
>me to edit the records.

>I appreciate any help, here is the recordset:

>Data1.RecordSource = "SELECT tblMarines.MarineID,
>Marine_PFT.PfT_Score,Marine_PFT.Qual_date as [PFT Date:] ,
>tblMarines.Lastname as [Last Name:], tblMarines.fname as [First
>Name:]," & _
>   " Marine_PFT.Pull_ups as [Pullups:]," & _
>   " Marine_PFT.run_time as [Run Time:]," & _
>   "Marine_PFT.Crunches, Marine_PFT.Body_Weight as [Body Weight:]," &
>_
>   "Marine_PFT.Fat_Percent as [Fat %], tblWorkSection.Platoon_ID as
>[Platoon ID] " & _
>   "From (tblMarines INNER JOIN Marine_PFT ON tblMarines.MarineID =
>Marine_PFT.MarineID)" & _
>   " INNER JOIN tblWorkSection on tblMarines.platoon_code =
>tblWorksection.Platoon_ID" & _
>   " WHERE Marine_PFT.qual_date = (Select Max(qual_date) from
>Marine_PFT " & _
>   " Where Marine_PFT.MarineID = tblMarines.MarineID) and " & _
>   " tblWorkSection.Platoon_ID = " & QuickRef.SectionID & "" & _
>   " ORDER BY Marine_PFT.Qual_date DESC"



Sat, 15 May 2004 06:16:33 GMT  
 Why won't this RS allow to add new record
YES you can... If you are joining the tables on a PK or Unique in all tables
concerned. Data grid or no the recordset is updatable.
But if you are adding a new record and only showing a few columns from each
table you can't because SQL needs a  value for every column
in the table unless otherwise specified. You have just said that most of my
stored procedures do not exist John... Call Microsoft I've discovered
somthing new... Get real and don't give bad advice to a question just dont
answer it if you dont know.

Harold.

Quote:
> You cannot update a recordset derived from more than one table.
> John

> >Would any one please take a look at this recordset and tell me why
> >won't it let me add new records ?? It is fed to a SSDBGRID when click
> >new record on the grid tells me "column is not updateble" but it allow
> >me to edit the records.

> >I appreciate any help, here is the recordset:

> >Data1.RecordSource = "SELECT tblMarines.MarineID,
> >Marine_PFT.PfT_Score,Marine_PFT.Qual_date as [PFT Date:] ,
> >tblMarines.Lastname as [Last Name:], tblMarines.fname as [First
> >Name:]," & _
> >   " Marine_PFT.Pull_ups as [Pullups:]," & _
> >   " Marine_PFT.run_time as [Run Time:]," & _
> >   "Marine_PFT.Crunches, Marine_PFT.Body_Weight as [Body Weight:]," &
> >_
> >   "Marine_PFT.Fat_Percent as [Fat %], tblWorkSection.Platoon_ID as
> >[Platoon ID] " & _
> >   "From (tblMarines INNER JOIN Marine_PFT ON tblMarines.MarineID =
> >Marine_PFT.MarineID)" & _
> >   " INNER JOIN tblWorkSection on tblMarines.platoon_code =
> >tblWorksection.Platoon_ID" & _
> >   " WHERE Marine_PFT.qual_date = (Select Max(qual_date) from
> >Marine_PFT " & _
> >   " Where Marine_PFT.MarineID = tblMarines.MarineID) and " & _
> >   " tblWorkSection.Platoon_ID = " & QuickRef.SectionID & "" & _
> >   " ORDER BY Marine_PFT.Qual_date DESC"



Fri, 14 May 2004 06:40:39 GMT  
 Why won't this RS allow to add new record
i agree with harold, john... :)
ahm Kaspa... have you tried checking the properties for the column on your
datagrid?.. 'coz i had encountered one instance such as that.. and found out
later on that the update property for that column on the grid was not
enabled :)



Quote:
> YES you can... If you are joining the tables on a PK or Unique in all tables
> concerned. Data grid or no the recordset is updatable.
> But if you are adding a new record and only showing a few columns from each
> table you can't because SQL needs a  value for every column
> in the table unless otherwise specified. You have just said that most of my
> stored procedures do not exist John... Call Microsoft I've discovered
> somthing new... Get real and don't give bad advice to a question just dont
> answer it if you dont know.

> Harold.


>> You cannot update a recordset derived from more than one table.
>> John

>>> Would any one please take a look at this recordset and tell me why
>>> won't it let me add new records ?? It is fed to a SSDBGRID when click
>>> new record on the grid tells me "column is not updateble" but it allow
>>> me to edit the records.

>>> I appreciate any help, here is the recordset:

>>> Data1.RecordSource = "SELECT tblMarines.MarineID,
>>> Marine_PFT.PfT_Score,Marine_PFT.Qual_date as [PFT Date:] ,
>>> tblMarines.Lastname as [Last Name:], tblMarines.fname as [First
>>> Name:]," & _
>>> " Marine_PFT.Pull_ups as [Pullups:]," & _
>>> " Marine_PFT.run_time as [Run Time:]," & _
>>> "Marine_PFT.Crunches, Marine_PFT.Body_Weight as [Body Weight:]," &
>>> _
>>> "Marine_PFT.Fat_Percent as [Fat %], tblWorkSection.Platoon_ID as
>>> [Platoon ID] " & _
>>> "From (tblMarines INNER JOIN Marine_PFT ON tblMarines.MarineID =
>>> Marine_PFT.MarineID)" & _
>>> " INNER JOIN tblWorkSection on tblMarines.platoon_code =
>>> tblWorksection.Platoon_ID" & _
>>> " WHERE Marine_PFT.qual_date = (Select Max(qual_date) from
>>> Marine_PFT " & _
>>> " Where Marine_PFT.MarineID = tblMarines.MarineID) and " & _
>>> " tblWorkSection.Platoon_ID = " & QuickRef.SectionID & "" & _
>>> " ORDER BY Marine_PFT.Qual_date DESC"



Fri, 14 May 2004 17:08:47 GMT  
 Why won't this RS allow to add new record

Quote:

> You cannot update a recordset derived from more than one table.

Sure you can, perhaps if you open the recordset with DISTINCTROW or the
dbInconsistent option.  Oh wait, this is crossposted to an ADO ng.  OK,
you're probably boned.  Nevertheless, if the primary keys of each table,
including any timestamp or "generation" fields, are included, it should
be possible to update the recordset.

--
Joe Foster <mailto:jlfoster%40znet.com>  "Regged" again? <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Fri, 14 May 2004 12:21:37 GMT  
 Why won't this RS allow to add new record
Thanks Harold that really did it, I think I need a vacation I should
have figured that out

Kaspa

Quote:

> YES you can... If you are joining the tables on a PK or Unique in all tables
> concerned. Data grid or no the recordset is updatable.
> But if you are adding a new record and only showing a few columns from each
> table you can't because SQL needs a  value for every column
> in the table unless otherwise specified. You have just said that most of my
> stored procedures do not exist John... Call Microsoft I've discovered
> somthing new... Get real and don't give bad advice to a question just dont
> answer it if you dont know.

> Harold.


> > You cannot update a recordset derived from more than one table.
> > John

> > >Would any one please take a look at this recordset and tell me why
> > >won't it let me add new records ?? It is fed to a SSDBGRID when click
> > >new record on the grid tells me "column is not updateble" but it allow
> > >me to edit the records.

> > >I appreciate any help, here is the recordset:

> > >Data1.RecordSource = "SELECT tblMarines.MarineID,
> > >Marine_PFT.PfT_Score,Marine_PFT.Qual_date as [PFT Date:] ,
> > >tblMarines.Lastname as [Last Name:], tblMarines.fname as [First
> > >Name:]," & _
> > >   " Marine_PFT.Pull_ups as [Pullups:]," & _
> > >   " Marine_PFT.run_time as [Run Time:]," & _
> > >   "Marine_PFT.Crunches, Marine_PFT.Body_Weight as [Body Weight:]," &
> > >_
> > >   "Marine_PFT.Fat_Percent as [Fat %], tblWorkSection.Platoon_ID as
> > >[Platoon ID] " & _
> > >   "From (tblMarines INNER JOIN Marine_PFT ON tblMarines.MarineID =
> > >Marine_PFT.MarineID)" & _
> > >   " INNER JOIN tblWorkSection on tblMarines.platoon_code =
> > >tblWorksection.Platoon_ID" & _
> > >   " WHERE Marine_PFT.qual_date = (Select Max(qual_date) from
> > >Marine_PFT " & _
> > >   " Where Marine_PFT.MarineID = tblMarines.MarineID) and " & _
> > >   " tblWorkSection.Platoon_ID = " & QuickRef.SectionID & "" & _
> > >   " ORDER BY Marine_PFT.Qual_date DESC"



Fri, 14 May 2004 12:31:17 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Why won't this RS allow to add new record

2. Why won't this RS allow to add new record

3. ADO: Why won't new record delete?

4. ADO: Why won't new record delete?

5. Why won't it let me add records

6. word VBA won't let me add a new record to an access table

7. Allowing only to add new records

8. Datagrid not allowing Add new record

9. ADO2.5, can't add new record to an empty table using record binding

10. adding new records & new record

11. SQL7 - Won't add records?

12. Can't add new records when using Linked forms

 

 
Powered by phpBB® Forum Software