Home > Archive > SQL Server Programming > March 2005 > Updateable query
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| David C 2005-03-31, 8:59 pm |
| I have an Access application that uses ODBC connections to SQL 2000
database. I have 2 Access queries that each have 2 tables linked on PK on
one and FK on another. One of the queries is updateable and one is not. I
cannot figure out the difference. Can anybody advise? Thank you.
David
| |
| Michael C# 2005-03-31, 8:59 pm |
| What do you mean one query is updateable and one is not? Are you getting an
error message? What are the queries? How about DDL? Your actual queries?
I've received an error message that "Query is not updatable" from ASP.NET
before - when my ASP.NET application didn't have permissions to the
directory where the database was stored.
If you have more info, posting it would help address your issue...
"David C" <dlchase@lifetimeinc.com> wrote in message
news:%23SW97tjNFHA.580@TK2MSFTNGP15.phx.gbl...
>I have an Access application that uses ODBC connections to SQL 2000
>database. I have 2 Access queries that each have 2 tables linked on PK on
>one and FK on another. One of the queries is updateable and one is not. I
>cannot figure out the difference. Can anybody advise? Thank you.
>
> David
>
| |
|
| This is one that works
SELECT WorkerTimesheets.*, People.LastName & ", " & People.FirstName AS
Worker, People.Active
FROM WorkerTimesheets INNER JOIN People ON WorkerTimesheets.WorkerID =
People.PersonID
WHERE (((WorkerTimesheets.CheckID)=0))
ORDER BY People.LastName, People.FirstName;
This is one that doesn't
SELECT DISTINCTROW [EmployeeLastName] & ", " & [EmployeeFirstName] AS
Employee, Employees.StreetAddress, Employees.PayRate,
Employees.PayFrequency, PayInfo.EmployeeNumber, PayInfo.HoursRegular,
PayInfo.HoursOT, PayInfo.EarnHourly, PayInfo.EarnGross,
PayInfo.PeriodEnding, Employees.TerminationDate,
Employees.MaritalStatus, Employees.FederalExemptions,
Employees.StateExemptions, PayInfo.TaxFederal, PayInfo.TaxFICA,
PayInfo.TaxMedicare, PayInfo.TaxState, Employees.ExtraFederal,
Employees.ExtraState, PayInfo.AdvanceEIC, PayInfo.TempDedAmt,
PayInfo.MiscDed, PayInfo.NetPay, Employees.HasMiscDed,
Employees.EICFlag, PayInfo.PayStatus, Employees.MedExempt,
Employees.FICAExempt, Employees.RateCode, PayInfo.RatePer,
Employees.SplitElig AS EmployeeEligSplit, PayInfo.SplitElig,
PayInfo.PayrollBatch, PayInfo.ProgramCode
FROM Employees INNER JOIN PayInfo ON Employees.EmployeeNumber =
PayInfo.EmployeeNumber
WHERE (((PayInfo.CheckNumber)=-1) AND
((Employees.Branch)=[Forms]![frmMain]![Branch]) AND
((PayInfo.ManualCheck)=False))
ORDER BY PayInfo.EmployeeNumber;
David
*** Sent via Developersdex http://www.developersdex.com ***
| |
|
| I figured it out. I forgot to include one of the PK's in one table in
the query.
David
*** Sent via Developersdex http://www.developersdex.com ***
|
|
|
|
|