PC Review


Reply
Thread Tools Rate Thread

DSNLess Connection and Table Updates

 
 
=?Utf-8?B?TUNocmlzdA==?=
Guest
Posts: n/a
 
      7th Jul 2005
I'm using the following code chunk to add a table to my db without a DSN
connection. The problem I'm having is that I can not edit/add/delete records
to the table.

I know that the permissions on the MS SQL db backend are checked for the
SELECT, INSERT, UPDATE, DELETE rights.

Any idea of what I'm missing.

Thanks

Mark
 
Reply With Quote
 
 
 
 
Van T. Dinh
Guest
Posts: n/a
 
      7th Jul 2005
Do you have PK define on each Table on the MS SQL Server?

Also, I find a TimeStamp Field on each Table will eliminate lots of problems
using MS SQL Server Tables as ODBC-linked Tables in Access.

--
HTH
Van T. Dinh
MVP (Access)


"MChrist" <(E-Mail Removed)> wrote in message
news:B8674CF4-C0BD-4B21-9F18-(E-Mail Removed)...
> I'm using the following code chunk to add a table to my db without a DSN
> connection. The problem I'm having is that I can not edit/add/delete

records
> to the table.
>
> I know that the permissions on the MS SQL db backend are checked for the
> SELECT, INSERT, UPDATE, DELETE rights.
>
> Any idea of what I'm missing.
>
> Thanks
>
> Mark



 
Reply With Quote
 
=?Utf-8?B?TUNocmlzdA==?=
Guest
Posts: n/a
 
      7th Jul 2005
Van,

Thanks for your response. No the table that I'm having troubles with does
not have a primary key defined. Is there a way of handling this without
adding an ID field in on the MS SQL Server?

Mark

"Van T. Dinh" wrote:

> Do you have PK define on each Table on the MS SQL Server?
>
> Also, I find a TimeStamp Field on each Table will eliminate lots of problems
> using MS SQL Server Tables as ODBC-linked Tables in Access.
>
> --
> HTH
> Van T. Dinh
> MVP (Access)
>
>
> "MChrist" <(E-Mail Removed)> wrote in message
> news:B8674CF4-C0BD-4B21-9F18-(E-Mail Removed)...
> > I'm using the following code chunk to add a table to my db without a DSN
> > connection. The problem I'm having is that I can not edit/add/delete

> records
> > to the table.
> >
> > I know that the permissions on the MS SQL db backend are checked for the
> > SELECT, INSERT, UPDATE, DELETE rights.
> >
> > Any idea of what I'm missing.
> >
> > Thanks
> >
> > Mark

>
>
>

 
Reply With Quote
 
Van T. Dinh
Guest
Posts: n/a
 
      7th Jul 2005
The lack of PK is the problem. IIRC, some earlier posts mentioned that you
can define a (local) unique index in Access for the linked Table. The Link
Table Manager in Access actually offers this when you link the ODBC Tables
using DSN.

I am not sure how to handle this using DSNLess. Since I always have a PK +
TimeStamp Field in each MS SQL Table, I didn't take notice of how to create
a (local) unique index on the linked Table either.

You may want to use the Google Group Search to search for relevant posts in
these newsgroups.

--
HTH
Van T. Dinh
MVP (Access)



"MChrist" <(E-Mail Removed)> wrote in message
news:4E4110A3-88FA-4E1F-BE3A-(E-Mail Removed)...
> Van,
>
> Thanks for your response. No the table that I'm having troubles with does
> not have a primary key defined. Is there a way of handling this without
> adding an ID field in on the MS SQL Server?
>
> Mark
>



 
Reply With Quote
 
Duane Hookom
Guest
Posts: n/a
 
      7th Jul 2005
You can generally create the pseudo index using a data definition query

CREATE UNIQUE INDEX PrimaryKey ON tblYourTable (YourFieldName)

--
Duane Hookom
MS Access MVP
--

"Van T. Dinh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The lack of PK is the problem. IIRC, some earlier posts mentioned that
> you
> can define a (local) unique index in Access for the linked Table. The
> Link
> Table Manager in Access actually offers this when you link the ODBC Tables
> using DSN.
>
> I am not sure how to handle this using DSNLess. Since I always have a PK
> +
> TimeStamp Field in each MS SQL Table, I didn't take notice of how to
> create
> a (local) unique index on the linked Table either.
>
> You may want to use the Google Group Search to search for relevant posts
> in
> these newsgroups.
>
> --
> HTH
> Van T. Dinh
> MVP (Access)
>
>
>
> "MChrist" <(E-Mail Removed)> wrote in message
> news:4E4110A3-88FA-4E1F-BE3A-(E-Mail Removed)...
>> Van,
>>
>> Thanks for your response. No the table that I'm having troubles with
>> does
>> not have a primary key defined. Is there a way of handling this without
>> adding an ID field in on the MS SQL Server?
>>
>> Mark
>>

>
>



 
Reply With Quote
 
Van T. Dinh
Guest
Posts: n/a
 
      8th Jul 2005
Thanks, Duane.


--
HTH
Van T. Dinh
MVP (Access)


"Duane Hookom" <(E-Mail Removed)> wrote in message
news:eq7r$(E-Mail Removed)...
> You can generally create the pseudo index using a data definition query
>
> CREATE UNIQUE INDEX PrimaryKey ON tblYourTable (YourFieldName)
>
> --
> Duane Hookom
> MS Access MVP
> --
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best DSNless Connection Method billharrison9@gmail.com Microsoft Access VBA Modules 2 25th Jun 2006 02:45 PM
ACCESS DSNless connection to SQL =?Utf-8?B?S2FyZW4gR3J1YmU=?= Microsoft Access External Data 7 24th Oct 2005 07:04 PM
Access 97 DSNless connection to SQL server ? Tony Epton Microsoft Access 1 6th Dec 2004 12:45 AM
connection limit from asp pages using dsnless connection string Jason Gallas Microsoft Access 0 5th Oct 2004 06:07 PM
Creating DSNless connection to MS SQL Server David J Duryea Microsoft ADO .NET 0 8th Jan 2004 01:17 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:31 PM.