Group:  Microsoft Access ยป microsoft.public.access
Thread: SQL Server

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

SQL Server
WMorsberger 26.09.2006 12:36:02
The database that I created was recently upsized to a SQL Server. I am now
running into the problem of not being able to add new records. How can I set
my form up to add new records to the table. Can someone please help?
Re: SQL Server
"Rick Brandt" <rickbrandt2[ at ]hotmail.com> 26.09.2006 12:41:26
WMorsberger wrote:
[Quoted Text]
> The database that I created was recently upsized to a SQL Server. I
> am now running into the problem of not being able to add new records.
> How can I set my form up to add new records to the table. Can
> someone please help?

The tables on the SQL Server need to have Primary Keys defined on them. If
you link to an ODBC connected table without a PK then the link is read only.
There is a work-around, but since every table should have a PK anyway that
is the way to fox it.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Re: SQL Server
"Pieter Wijnen" <it.isi.llegal.to.send.unsollicited.mail.wijnen.nospam.please[ at ]online.replace.with.norway> 26.09.2006 12:46:27
make sure there's an unique index on the table
if you can't / aren't allowed to modify the table itself you can make an
Access index for the table

to do so Paste (similar) SQL in the SQL view of a new Query
CREATE UNIQUE INDEX U_myTable ON myTable (MyUniqueColumn) [WITH PRIMARY]
or
for compound unique columns
CREATE UNIQUE INDEX U_myTable ON myTable
(MyUniqueColumn1,..,MyUniqueColumnN) [WITH PRIMARY]

--
Pieter Wijnen

My feeble Access pages (good links though)
http://www.thuleeng.com/access
When all else fail try:
http://www.mvps.org/access
http://www.granite.ab.ca/
http://allenbrowne.com/
http://www.lebans.com/



"WMorsberger" <WMorsberger[ at ]discussions.microsoft.com> wrote in message
news:4AB1DC73-A49F-4751-86D8-46D1BC4E61C2[ at ]microsoft.com...
[Quoted Text]
> The database that I created was recently upsized to a SQL Server. I am
> now
> running into the problem of not being able to add new records. How can I
> set
> my form up to add new records to the table. Can someone please help?

--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 4868 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!


Re: SQL Server
WMorsberger 26.09.2006 17:52:02
I went into all the tables and added primary keys to ones that did not have
them and everything worked perfectly.

Thank you for helping me.

"Rick Brandt" wrote:

[Quoted Text]
> WMorsberger wrote:
> > The database that I created was recently upsized to a SQL Server. I
> > am now running into the problem of not being able to add new records.
> > How can I set my form up to add new records to the table. Can
> > someone please help?
>
> The tables on the SQL Server need to have Primary Keys defined on them. If
> you link to an ODBC connected table without a PK then the link is read only.
> There is a work-around, but since every table should have a PK anyway that
> is the way to fox it.
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt at Hunter dot com
>
>
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net