Hi all, wonder if anyone can assist me with this the SQL Server security/write (?) issue. The SQL Server Admin has created a table for our Dept. to use and via SQL Server I can get access to it using the username and password she supplied to me. I can also link to this table in Access 2002 via ODBC which is the way I am using to write to SQL server tables. I have developed an Access application to allow one of our staff to be able to write data to the SQL Server table at a click of a button, however when I open the table the 'add new record' button is greyed out, I can not add any data to the table. I explained this problem to the Admin as well as the way in which we access the table and she is certain that the problem lies in Access but i'm unsure how that can be the case.
Has anyone experienced this problem before ? Is there a fix and if so how is that implemented ?
I have an MS Access accdb with linked SQL Server 2012 ODBC tables. I am working on a procedure to copy data from local tables to these linked tables (identical schema). I did a simple
Code:
DoCmd.RunSQL "INSERT INTO linkedTable SELECT * FROM localTable"
This works, but is very slow. Way too slow. (INSERT copies the data one record at a time).
I would like to copy the data in a bulk operation, or operations that I can execute programmatically.
I am rebuilding an application for a client and I have an Access table that I am using as a temporary table. Once the user is done entering information into the temporary table through a form, the user presses an update button that appends the records using an Append Query in Access to an SQL Server Table.
The following error message occurs:
"ODBC -- insert on a linked table 'linked tblname' failed.
[Microsoft][ODBC SQL Server Driver][SQL Server] Explicit value must be specified for identity column in table 'linked tblname' when IDENTITY INSERT is set to ON. (#545)
I am using a form, subform combination to record a bill with many details. The bill summary is posted into a tbl_TransactionsMain table in SQL Server using the ADO AddNew method. The PK for the tbl_TransactionsMain is then entered into the temporary table in Access. When the temporary table records are appended into tbl_TransactionDetail the error message occurs.
What is also interesting is while typing out this post I thought to test the error by manually trying to run the query. The query worked like a charm! :confused: When the orginal error occurred off of the form I tried to run the query manually and it failed. I am guessing that this might have something to do with the ODBC timeout.
I think SQL Server/ODBC connection is not liking how I have a set of records in an Access table with foreign key numbers assigned when I am attempting to append the records. I am new to SQL Server and any ideas are most appreciated! :)
In Access2010 I have created a linked table to a SQLServerExpress database.I have a user in SQLserverExpress with only reading rights.This linked table is used in a form which only shows the information. When opening the form, it prompts for the SQLserverExpress username and password.How can I configure the linked table so that it logs in automatically with the SQL user I prefer so that the user does not need to enter a user / password?
I have a fe that has 5 tables linked to a backend db on the server.I want to add a new table to the fe that is linked to a second db on the server? What I have tried.I have created the tbl_called in the fe.when I right click on it and go to Linked Table Manager I do not see it on the list. The only tables in the list are the 5 I linked before. Why is tbl_called not showing up??
Is it same thing about speed and other issues to have ADP application that works with SQLserver and to have a MDB (or MDE) application that has no querys but works with sql views instead?
I am in need of some assistance regarding SQL Server ODBC links and security. This is for a project at work...
1) I have an MDB that has linked tables through ODBC to a SQL Server 2000 database. This is how I chose to write this multi-user application (instead of the ADP method).
2) My IT department created a user ID that the application will use to connect to the database. They chose this method instead of having to create many user accounts with varying permissions. I have programmed permissions within the application.
3) After linking the tables through ODBC, it defaults to my Windows User ID for the connection. Because of this, I have used a connection string with the application's User ID/Password and perform a RefreshLink on all linked table definitions on startup to ensure valid connection.
This is successful, but my IT department is seeing that another user is attempting access to the SQL Server database--the username in the LDB/MDW file! This is what I don't understand. If I open the database without going through workgroup security, the word "Admin" is passed and the authentication fails. If my users would login through the MDW file, their user IDs would be passed and again, authentication will fail as they are not valid users (only the application ID would be valid).
What is really going on here? :confused: How can I prevent the "Microsoft Access User ID" from being passed through the ODBC link?
Here is a sample of the connection string I'm using: Driver={SQL Server};Server=ServerName;PersistSecurityInfo=Yes; AnsiNPW=No;Database=DBName;Uid=Username;Pwd=Passwo rd;
I created a database in Microsoft Access and then upsized it to SQL Server afterwards.
I now need to add a new column to a table in the database. So I added the new column in SQL Server using ALTER TABLE command. This column is a foreign key which has an associated parent key in another table which contains a description of the column. e.g. Main_Table Case_ID Foreign_Key_Field_ID 1234 78
New_Foreign_Key_Table Foreign_Key_Field_ID Foreign_Key_Field_Desc 78 Describes the ID 78
I also setup a CONSTRAINTREFERENCE between the fields in these 2 tables.
I then relinked my tables using the Linked Table Manager to pick up the change to the table I altered (Main_Table). I also linked to the new table I created (New_Foreign_Key_Table).
My problem: In Access if I create a new table I can select the lookup value for a field in the Table Design view Lookup tab. However, I altered my table in SQL Server and then linked to it again to pick up the change. Now when I view the linked table in Access it does not have any lookup value AND it's not possible to change this for a linked table.
Is there some piece of SQL I can use in SQL Server to change the lookup value for the field in my table OR have I approached this the wrong way. Should I have modified the local table in Access and upsized it again?
Otherwise if I select all values from my Main_Table in a form it displays the Foreign_Key_Field_ID instead of the Foreign_Key_Field_Desc because the lookup value has not been set to Foreign_Key_Field_Desc
This posting is a bit long - I hope it makes sense.
Any ideas or suggestions would be greatly appreciated.
We are sharing an Access 2003 database amongst two departments that contains twelve (12) tables that are SQL Server linked tables. Nine (9) of the tables work just fine for people in both departments. Three (3) of the tables cannot be opened until the user refreshes the link(s) using their ODBC DSN.
We do not understand why nine of the tables work without issue but three will not.
Has anyone ever run into this issue before? Does anyone have any ideas on how to resolve this issue?
I'm trying to store files on a linked SQL Server table, much the way I would using the Attachment data type in Access. (I couldn't use the Attachment data type, though, due to size restrictions - we're storing about a gig a week.)
Almost everyone says to store the attachments on a file system and save the location - I can't do that because of varying permissions. The files HAVE to be stored in the SQL Server table for security reasons.
So how do I do it? I've tried converting the files to binary and updating the recordset that way, but it always comes back as null. I'm not sure what I'm doing wrong.
Code: Public Function Test(strFile As String) As Boolean Dim rsAtts As dao.Recordset Dim ifilenum As Double Dim btAR() As Byte Set db = CurrentDb
Hi, My access database's tables are currently linked to an excel document. My question is, how do I move my database to the network? Currently when I move the the database to the network no one can open my tables because the link goes to my documents on my computer which they can't access on the network. So how do I move the database and maintain the link between the database and my tables?
I am trying to build a Form that will show an estimate (then eventually will be moved to a project if customer and employee aggree to price and project) in a Form F_Estimates is a M_Customers(Customer_ID) (Based on a Table) and thier info in a Subform. Also is the "projected costs" from parts out of the Parts(Part_ID) (Based on another Table) in a second Subform as a list that I need to calculate $$$ in (Dang that still sounds evil and definately NOT understandable even after edit... so)
Here's some basic info
Tables
EstimatesandParts - Table EstimatesandParts_ID : Autonumber Estimate_ID : Number Part_ID : Number
Parts - Table Part_ID : Autonumber PartNumber : Text (not a number due to some part#s have letters in them) PartName : Text Unit Price : Currency Description : Text
Estimates - Table Estimate_ID : Autonumber InvoiceNumber : Text (again can have letters in it) EstimateDate : Date/Time EstimateTime : Date/Time Employee_ID : Number Customer_ID : Number ProblemDescription : Memo
Customers - Table Customer_ID : Autonumber FirstName : Text LastName : Text CompanyName : Text Address : Text City : Text Province_State : Text Postal_ZIPCode : Text (CDN Postal codes are letter num letter...)
you can see the link table in the EstimatesandParts Table
Now I want to use that link to populate a subform in the F_Estimates form
Forms
SF_Customers - SubForm
(all boxes atm are text boxes on this form till I figure out the Parts section then will use same base for this so I can pick any customer in the database to be the customer for this estimate. Also will have ctrl button for making new customer with customer form and a refresh on Focus Gain bit of code)
FirstName LastName CompanyName Address City Province_State Postal_ZIPCode
SF_Parts - SubForm Default View -Continuous Forms
(want it to be a list of parts that I can grab prices and descriptions from then in a bit of code to calculate a cost of parts)
Part_ID : Combo Box Control Source - Part_ID Row Source Type - Table/Query Row Source - SELECT Parts.Part_ID, Parts.PartNumber, Parts.PartName, Parts.UnitPrice, Parts.Description FROM Parts ORDER BY Parts.Description;
(Pulls info from the table Parts for input into a list of parts to be used on that project)
PartName : Text Box UnitPrice : Text Box
(here's where I run into problems due to the fact that the form is not based on the parts table but rather the link table EstimatesandParts so I can't propogate the info to the 2 other text boxes, ps I dont care if they cant be text boxes and have to be linked or some other type I'm not "set" just need to find out how to make it work )
(have tried a couple things to complete this task)
(works AWSOME ... for ONE ROW then propogates the second selection to the first and second and third selection to first second and third and so on ...)
(tried to make control source for the txtPartName to)
=Forms!Parts!Partname
(Doesnt exist .. akkk, cant use ActiveForm either as it doesn't focus on the SubForm but the MainForm ... cry)
(Combo Boxes Select Customer and Employee from list of present ones of each)
SF_Customers SF_Parts
(Both SubForms on the main form)
Now this is an Exerp from my entire Database I like to work on one small problem at a time and I have made this its own little database till I figure out the problem then I will bring the info I learn back into the rest of the database and go from there ...
Hope you can help I have a feeling I will need to make a recordset and go from there but I'm just not able to wrap my head around that for some reason
Thanks in advance for ANY and ALL help that I get from here
I have a ms access application in Front End and linked tables to sql server 2008 r2 in back end.. every time I open my application the linked tables ask to me for the user and password of the sql server user of the odbc conection. I want to connect to my sql database without login every time the user open the application, I know that can be possible if I start session from vba code...
I have created a code below to test whether I can run a query and retrieve a data from an SQL server table. And so far I can return the result using a messagebox. but somehow I just don't know how to use this connection to update the table inside this access file. Basically I want to use this as a front end file. then when the form is open it will automatically update the table inside this access file and load the data to the combo box as a list.
Code:
Option Compare Database Sub LocalServerConn_Test() Set conn = New adodb.Connection Set rst = New adodb.Recordset
I have an Access 2000 database with some linked tables. When upsizing the database I selected 'Save password and user ID with attached tables'. Therefore in the Linked Table manager after each table in brackets I have the name of the database to which the tables are linked.
I am now wondering if I want to link the tables to a different database how do I change the database name, which is in brackets after the table name.
If I select a table and select 'prompt for a new location each time' I am getting prompted to select a different DSN. At the moment I don't have a DSN and I don't want to have to set one up.
I imagine that the database name and the user id and password I entered in the upsizing wizard are stored in some configuration box but I don't know where I can access this.
I would like to duplicate table from SQL Server 2000 to Access using VBA. How to programmatically establish a connection to SQL Server using VBA codes?
Good evening, my web site (in hosting) stores data in a SQL Server database. Now, I've and import these data in an Access application and, of course, I've no direct access to SQL Server instance. I thought about using Web Services. Does anybody know how to do, or has an alternate way?
I have an Access 2010 front end with linked tables via ODBC to a SQL Server back end. Is it possible to add, delete, and otherwise alter the tables on the SQL server from the Access front end? I've tried the following but received an error "cannot execute data definition statements on linked data sources"
Front end Access 2010, back-end SQL-server 2008 R2.
Normally I retrieve a certain value by Dlookup("myvalue", "mytable",...)
or
strSQL = "SELECT myvalue FROM mytable...;"
Set rs = CurrentDb.OpenRecordset(strSQL, 4)
But is there any faster way to retrieve a single value from an SQL-server table, beside doing doing the select by a stored procedure running through a pass through query, then open a recordset
Set rs = CurrentDb.OpenRecordset("mypassthroughquery")
just to retrieve ONE value?
I could not find something like DLookup("...) for an SQL-Server or in T-SQL.
I am attempting to link a table in one database to another database using the server name designation (ie.//2sxfprinff01Group) instead of the mapped network name (ie. G:). I tried relinking using the Access Link Manager. Right click on the linked table. But it does not let you edit the link.
Access 2007 does not allow this and reverts links to the G: drive. There are situations where the the IT department have set the mappings to this shared location as an H: for some of the employees. In those cases, the employee gets an error message telling them that Access cannot locate the G: drive.
An obvious solution is to get the employees remapped to the G: drive. However, one would think that MS would have allowed for mapping to the designated location and not an alias.
I have a table for a multiple parents linked to a child table. I need to figure out a way to only allow 1 parent to be coded as primary, 1 as secondary, and then the rest as other... I thought about making Primary/Secondary/Other a primary key. But then I can only have 1 other. I would have to make a finite number of parents that could be entered and I want an infinite number.... My end goal is to have a report that only has a primary and second parent on it, but the rest of the parents still exist in the table...
Hi, I am extracting data from linked db2 table using access make table query. First I create a select query and can view the linked db2 data, but when I change to a make table query I get an error message, "invalid argument", when I run the make table query. There is no selection critera specified. Has anyone had this happen? and Do you know a solution?
I have one DB that is used for creating/storing customer ID's, and another DB that is used for creating/storing job information for customers.I have linked the table from the customer DB to the job DB.
There is a table in the job database that holds customer name and ID, and some VBA that generates unique job codes.
Is it possible to have the data from the linked table automatically update into the existing table?