Hi All,
1. Created table in SQL Server 2K with Primary key as int Identity
2. Link to table in MS Access 2K
3. Using form in MSAccess to update the linked table
I want SQL server to automatically update the int identity column as it
would normally. i.e. no need to enter a value even though it is a NOT
NULL field. SQL Server recognises this , allows the row details to be
entered without the int identity and creates it when moving to the next
blank row (in Enterprise Manager) or allows an Insert in Query Analyser
without the int column used (in fact it demands that the int column is
not in the Insert)
How do I update the row in Access, as it returns an error message
saying that the int column cannot be null. The properties cannot be
changed as it is a linked table. I would appreciate help from those
that KNOW the answer as I have tried all the silly ideas such as trying
to set the int identity to NULL in SQL Server (which is not allowed of
course but it was a long shot!)
Thanks 3 7901
OOPS - Problem solved
Don't we all love MS ?
For those that would like the answer....
If you do not set up the SQL Server int identity as a Primary Key,
Access linkes to it as a Number field NOT as an Autonumber.
Setting it as a Primary key solved the problem.
Why on earth MS Access cannot link a table and recognise int identity
and make it an autonumber is beyond me - maybe there is a good reason !
It's you that's at fault, not MS.
SQL Server doesn't hold your hand quite as much as Access, so you can
set up tables with no primary key and it doesn't complain, whereas
Access prompts you to do so. In your first post you say that you set
the Int Identity column as the Primary Key which is, as you surmise,
analogous to Access' Autonumber. But in your second post you admit
that you simply set up the int column to be an identity column, but
hadn't made it the PK, and you lambast Access for not knowing that that
was your intention! There may be any number of reasons to set up an
identity column and not to make it a PK. It's up to you to be specific
in your data design. I, for one, would be absolutely furious with a
product that assumed that an Int Identity column in a SQL Server table
was the PK unless I had made it so.
Edward
Thanks for a rather odd reply.
Perhaps I wasn't clear. If I define an int identity in SQL Server, I
would have expected it to recognise this as an Autonumber.
If I specify a field as a Primary Key in SQL Server, I would expect
this to be recognised as a primary key.
Simple really. te********@hotmail.com wrote: It's you that's at fault, not MS.
SQL Server doesn't hold your hand quite as much as Access, so you can set up tables with no primary key and it doesn't complain, whereas Access prompts you to do so. In your first post you say that you set the Int Identity column as the Primary Key which is, as you surmise, analogous to Access' Autonumber. But in your second post you admit that you simply set up the int column to be an identity column, but hadn't made it the PK, and you lambast Access for not knowing that that was your intention! There may be any number of reasons to set up an identity column and not to make it a PK. It's up to you to be specific in your data design. I, for one, would be absolutely furious with a product that assumed that an Int Identity column in a SQL Server table was the PK unless I had made it so.
Edward This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Andreas Lauffer |
last post by:
I changed from Access97 to AccessXP and I have immense performance
problems.
Details:
- Access XP MDB with Jet 4.0 ( no ADP-Project )
- Linked Tables to SQL-Server 2000 over ODBC
I used...
|
by: Ben |
last post by:
Right now I have 1 table. The first part is the first and last name
along with address etc. There is about 10-15 fields here. The second
part consists of times, penalties and if they enter this...
|
by: Philippa |
last post by:
I'm trying to access data in vba using the openrecordset command. The
data in on a SQL Server 2000 database, and I have linked tables to
that data. the Table I'm trying to access is one of these...
|
by: Bri |
last post by:
Greetings,
I'm having a very strange problem in an AC97 MDB with ODBC Linked tables
to SQL Server 7. The table has an Identity field and a Timestamp field.
The problem is that when a new record...
|
by: kharless |
last post by:
Greetings,
If I use a "select into" to clone a table, all attributes are created
correctly, however, if I use the same statement across a linked server,
my identity column loses its IDENTITY...
|
by: ARC |
last post by:
I'm having trouble here with Access 2007 and connecting to a different
database.
The code below works great IF the previous back-end database connection is
still present and you are trying to...
|
by: itisjitin |
last post by:
Hi All,
1. Created table in SQL Server 2K with Primary key as int Identity
2. Link to table in MS Access 2K with child table
3. Using form in MSAccess to update the both master and child linked...
|
by: Dave |
last post by:
I'm using the SqlBulkCopy object to bulk insert large DataTable's into
SQL Server. Its working well except tables with IDENTITY columns in
them.
When calling...
|
by: EManning |
last post by:
I have an A2003 database linked to SQL Server 2005. My problem is
with a popup form with a filtered table as a recordsource. I set the
filter with an SQL statement like this:
SELECT * FROM...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
|
by: Matthew3360 |
last post by:
Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: Johno34 |
last post by:
I have this click event on my form. It speaks to a Datasheet Subform
Private Sub Command260_Click()
Dim r As DAO.Recordset
Set r = Form_frmABCD.Form.RecordsetClone
r.MoveFirst
Do
If...
|
by: jack2019x |
last post by:
hello, Is there code or static lib for hook swapchain present?
I wanna hook dxgi swapchain present for dx11 and dx9.
|
by: DizelArs |
last post by:
Hi all)
Faced with a problem, element.click() event doesn't work in Safari browser.
Tried various tricks like emulating touch event through a function:
let clickEvent = new Event('click', {...
| |