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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2003 w/ SQL Express 2005

Status
Not open for further replies.

Kumba1

Technical User
Aug 29, 2002
94
0
0
I have a database i'm trying to link against an SQL Express 2005 backend via ODBC. The tables show up fine, I can access/edit/write/update all the tables fine. The problem i'm having is when I run a query or bound form I cant make any changes. No new form button, no ability to edit.

I cant help but believe i'm missing something simple here. I went through and made sure all bit fields didn't allow null and were set to 0 if they were null. Any other ideas?
 
Do your tables have primary keys, and are those keys in the queries that the forms are bound to?

 
Fixed one problem, and found another.

Went through tables and added 0 as the default value for all bit fields. That fixed the problem of not being to update a table through a query/form.

What I then found out is that I cant have two tables in a single query and be able to update them. Here's the test query that i'm running:

SELECT [Report History 2].*, LCM.*
FROM LCM INNER JOIN [Report History 2] ON LCM.[FILE #] = [Report History 2].[FILE #];

This is an inherited mess and i'm trying to avoid a complete re-write of their datamess, err database. Both tables have their primary keys included in output obviously, both have their bit fields set to 0 if null and with a default value of 0. Seperately both tables are updateable through query but not together.
 
If you can't update the two tables together then you don't have something correct because if it is done right, you can do this. First of all get rid of the # as part of the name. That is something that will bite you more times than ever (using reserved words or special characters).

2nd, each needs a primary key and the join needs to be on the foreign key. I'm guessing that a major part of your problem is your name with the # in it.


Bob Larson
A2K,A2K3,A2K7,SQL Server 2000/2005,Crystal Reports 10/XI,VB6, WinXP, and Vista
Free Quick Tutorials and Samples:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top