473,405 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

self Aware ODBC...?

Me
I have a duly annoying ODBC problem:
I make a new, blank Access 2k database, and add a single ODBC link to
MS SQL Server table, using a DSN login which has full access rights to the data.
If I remain in the same session, everything works. If I exit the MDB and
return to it,
the table is suddenly not allowing record addition! (I try to add a
record in datasheet mode)- up jumps: SQL Error #229, INSERT permission
denied, on object XXX, database XXX, Owner DBO.

this happens every time, unless I open a new MDB. Both in Access 97
and 2000.

I have done some ODBC VBA tinkering, and found that if I set the
..connect string of that link's Tabledef object to "", and do a
tdf.RefreshLink
it works suddenly [how come it connects, if it has no connection
string anymore? only access Knows...]
still this only works until the database closes.

[short 2 minute boxing round with access goes here, knockout in 10
lines of code to Access of course]

Actually, now even that doesn't work anymore. (perhaps Access doesn't
like it when I post things about it).
what have I done to deserve this?

Thanks

HH.
Nov 13 '05 #1
1 1301
"Me" <he****@lycos.com> wrote in message
news:2d**************************@posting.google.c om...
I have a duly annoying ODBC problem:
I make a new, blank Access 2k database, and add a single ODBC link to
MS SQL Server table, using a DSN login which has full access rights to the data. If I remain in the same session, everything works. If I exit the MDB and
return to it,
the table is suddenly not allowing record addition! (I try to add a
record in datasheet mode)- up jumps: SQL Error #229, INSERT permission
denied, on object XXX, database XXX, Owner DBO.

this happens every time, unless I open a new MDB. Both in Access 97
and 2000.

I have done some ODBC VBA tinkering, and found that if I set the
.connect string of that link's Tabledef object to "", and do a
tdf.RefreshLink
it works suddenly [how come it connects, if it has no connection
string anymore? only access Knows...]
still this only works until the database closes.

[short 2 minute boxing round with access goes here, knockout in 10
lines of code to Access of course]

Actually, now even that doesn't work anymore. (perhaps Access doesn't
like it when I post things about it).
what have I done to deserve this?

Thanks

HH.


Maybe you have SQL Server authentication in Mixed mode, and you didn't tick
the "Save Password" box when you created the link. Thus, when you first
create the link, Access uses the user name/password that you entered to
authenticate against SQL Server, but later, Access having forgotten the user
name/password, SQL Server uses your Windows login to authenticate.
Different SQL Server user, different permissions. Just a thought.
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: bruce stockwell | last post by:
Using 'self' in classes seems pretty straight forward. My curiosity is why I have to use it. Shouldn't it be implied? If I create an instance of 'human' called 'bruce' and call the method 'blink'...
15
by: aurora | last post by:
This may sound a little crazy. I capture the output of one class by redirecting the sys.stdout. However the is another threading running at the same time and occasionaly it output some messages to...
4
by: Andreas Lauffer | last post by:
Can anyone tell me advantages / disadvantages of DataDirect Server Wire ODBC-driver? Any experiences? What about redistribution? Andreas Lauffer, easySoft. GmbH, Germany
2
by: Ev | last post by:
I have a database table in SQL Server that has a self join. In C# I have a DataTable with a self-join. I have defined a foreign key constraint on the DataTable for the self join. The...
4
by: Martin M. | last post by:
Hi, I have the following question: How can an imported module see/find the path to itself? Background: From my main script I import a module which needs a file (AppleScript) located in the...
1
by: qhe | last post by:
Hi, all: My VC6 MFC application is recognized as a Unicode application by the driver manager, so when I read nchar fileds in MS SQL Server database, the SQL_WCHAR does not convert to SQL_CHAR,...
34
by: Chris | last post by:
Is there ever a reason to declare this as if(*this == rhs) as opposed to what I normally see if(this == &rhs) ?
24
by: Peter Maas | last post by:
The Python FAQ 1.4.5 gives 3 reasons for explicit self (condensed version): 1. Instance variables can be easily distinguished from local variables. 2. A method from a particular class can be...
2
by: notnorwegian | last post by:
class TaskGroup: def __init__(self): self.group = def addTask(self, task): self.group.append(task) is this wrong? i have a program thats too big to post but should i just do group.append...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.