I am having a problem with an access database that is connecting to a sql server. When trying to run any queries it is very slow. I think the problem might be caused by the ODBC link and I was wondering if there are any alternatives to using ODBC to connect access and sql.
Hello all, is there a way to change an ODBC connection in MS Access. I have 4 ODBC connections that I can choose from (all of them from the same server), and instead of manually recreating a new ODBC connection everytime, I would like to point it to the new connection. The ODBC connections (Tables) have the same information, but throughout different times during the month.
Used to use these forums quite regularly and always found people to be of help, even started chipping in occasionally with the odd pearl myself :rolleyes:
Anyhow, having forgotten my username i'm back under a different guise and have a problem that i'd like some help with.
My company has a website running asp (not .NET) with an sql database backend. Basically we want a localised system to deal with order processing with daily updates to customer, order tables etc. I started to build something in VB and SQL but time is critical and once I work out this problem I can churn something out in access double quick time.
I can get the ODBC connection open to the sql database and import the data to Access 2007 table (ie dbo_tblOrders), but I then need to find/write some code to fetch extra records daily and append them to the EXISTING tables. At present data is fetched and added to a new table. Is it merge queries I need? If so how, and can I set it to only fetch new records?
when i run this function i get an error : "You cannot use ODBC to import from, export to, or link an external Microsoft Jet or ISAM database table to your database"
when i try to import in the same way a dbf file (insted the csv file) with VFP it's working well.
what seems to be the problem? how can i fix it? or if some one know how can i import a large csv file into access DB in an efficient diffrent way?
I finally got a chance to test the setup remotely, and it basically works with all the links I've set up.
I wanted to see how it would behaves should it disconnect or something and thus manage it gracefully.
First, I broke the network connection and tried to navigate to next record. Instead of getting a error message, Access just crashes. I'm not sure if this can even be trapped at all.
Secondly, I disconnected the connection then reconnected it. Access then tells me that the server has gone away, presuming because it's still looking to the old connection that was broken. Running the code to repair link fails also with same error. Can this be resolved with having to quit & restart Access?
Thirdly, I put a breakpoint on Form's Error Event but this doesn't seem to always to catch all errors. It does catch error if I tried to start up a form without the connection, but if it already has been started, and the connection was broken, the Error Event is never fired even though I get a dialog saying ODBC Call failed, then a zillion of dialogs saying Object no longer set or invalid. This would be extremely annoying to my end users.
I've moved tons of text files or Excel files into Access DB's but I need to take an ODBC report and put it into a table on a new Access DB. If I save the report as a text file I get boxes when I import it to the new DB. If I use Excel I have to make a new table each time. Can anyone suggest the simplest way to take an ODBC report and put it into an Access table. THanks
I've just set up my Access on a new PC and now when I try to connect to my MySQL database through odbc, Access crashes without any error messages, just the standard microsoft error reporting message.
I have Microsoft Access 2003 which is running fine. I have setup ODBC source through windows xp Professional control panel.
While i am in access application and try to open by selecting File/Get External Data/Link Tables
It open Link PopUp Window, then from the Files of type drop down, I select ODBC Database(). Windows just disppear, not opening odbc source selection window.
Please could you help me, why this is happening and sort it out.
Database Results Error [Microsoft][ODBC Microsoft Access Driver] General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xcac Thread 0xcc0 DBC 0x1090064 Jet'.
The code: example.asp Code:<%fp_sQry="SELECT count(*) FROM TEVPDATA where ((datediff('d', '" & date() & "', DT3PROF1) between 0 and 30)) and (COL2 = 'PROF1/SLM')"fp_sDefault=""fp_sNoRecords="<tr><td colspan=1 align=left width=""100%"">No records returned.</td></tr>"fp_sDataConn="Fabos"fp_iMaxRecords=0fp_iCommandType=1fp_iPageSize=0fp_fTableFormat=Truefp_fMenuFormat=Falsefp_sMenuChoice=""fp_sMenuValue=""fp_iDisplayCols=1fp_fCustomQuery=TrueBOTID=1fp_iRegion=BOTID%>
I am working on an Access 2002 database where one of the tables has five required fields making up the key.
There is a form that is linked to this table which is used for adding new records.
There is a close button on this form that has the following code in it's OnClose event:
"DoCmd.close"
When the form is opened, no data entered and then the close button is clicked - nothing happens.
It used to work fine, until I recently upsized the database into a SQL Server database and now it's all gone horribly wrong.
If I close the form manually by clicking on the cross, I get this error:
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'Product', table 'LeasebookSQL.leasebook_user.leases'; column does not allow nulls. INSERT fails. (#515) [Microsoft][ODBC SQL Server Driver][SQL Server] The statement has been terminated. (#3621)
Can anyone please tell me how I can get the form to close without trying to save the record, especially when no changes have been made to the data on the form?
I have a Access front end connected to a MS SQL database using a ODBC connection which is working fine of course.
When I compile it as a runtime version and install it on the business computer I get an error with the ODBC connection (I can't remember exactly what pops up). On the business computer I have installed SQL Native Client and in the ODBC added a System DSN (which works).
I am in need of consultation for MS Access reading data from ODBC connection. I have SQL Server that has all the data for the project financials etc.
I need a database that will read only certain data from the tables, for example, I don't need to import all 500,000 lines from SQL through ODBC connection, I just want to bring certain data for a list of projects whichever are opened and load only that data in MS Access so the group then can add additional details for that project in a shared MS Access.
Right now, all I can do is connect to that database through ODBC and brings all the data which I don't need all as it increases the size of the database, but just a criteria to specify which data to bring, if that's possible to do.
I am trying to create an ODBC link to a copy of the Northwind data base.I am running Win7 on a 64 bit operating system but am keeping office running as 32 bit for Access, Excel , Visio etc due to the fact that I have a lot of old apps tied to them.
When I attempted initially to create a new system DSN ODBC connection it only allowed me to use SQL drivers. (No plurry good) So after some searching I found out that I could use a file in C:WindowsSysWOW64 called "odbcad32.exe" which has allowed me to view /use the total list of drivers to import data.So I can set up a DNS ODBC named Northwind1 and I can access the database without problems using Excel.However if I try to use the same ODBC link in Access to connect to Northwind1 I get the following error message:"You cannot use ODBC to import from export to, or link an external ?Microsoft Access or ISAM database table to your database".
My main experience is with MySQL and PHP so I'm kindof stumbling around in the dark here. Heres my story:
We recieved a new server and migrating from (Windows Server 2000, IIS 5.0, Access 2000) to (Windows Server 2003, IIS 6.0, Access 2003) has been nothing but problems.
I have setup IIS to work with ASP, I've also setup a system DSN. The access file was copied over from the previous server. We're running Access 2003 and now I can't seem to get this ASP script to work.
When I try to upload a file to the script I get this error:
Line: 42 Char: 7 Error: HELP!!! Error: [Microsoft][ODBC Microsoft Access Driver] Invalid SQL statement expected 'DELETE','INSERT','PROCEDURE','SELECT', OR 'UPDATE'. Code: 0 Url: (URL address blocked: See forum rules)
Its included in a file called FileRead.htm here is the part that refers to the error lines: Code: var TheFile, FileStrm;// Retrieved field namesvar M_ssn, M_inits, M_Lname, M_Fname, M_DSSN, M_ruc, M_paycode;var M_normamt, M_payamt, M_pgrp, M_poe, M_pltcd, Payrollnum, Payrolldate;// var Trash, FieldData, FieldNames;var TrashLineNum = 1;// Create the file Stream Object (ReadOnly)TheFile = new ActiveXObject("Scripting.FileSystemObject");FileStrm = TheFile.OpenTextFile(FName,1,false);// Setup the Database Connectionvar SQLCommand, TheRS, TheConnection, DSNString, Commands, MyDC;FieldNames = new Array("ssn","inits","lname","fname","dssn","ruc","cco", "payamt","normamt","notsureone","pgrp","poe", "pltcode","recstatus","paychgflg","paystatuscode", "payrollnum","payrolldate");// Connect the the DatabaseDataLib.ConToDB();MyDC = DataLib.GetDC();// Get Payroll NumberPString = prompt("Enter Payroll Number","025");Payrollnum = parseInt(PString,10);// Get Payroll DateDString = prompt("Enter Payroll Date","20000101");Payrolldate = DateLib.FromMil(DString);// Setup the Database Connectionvar NumRecs = 0;//MyTest = DataLib.GetRS("PaydayUpdate1");alert("About to cross into the CurExtract!!!");MyRS = DataLib.GetRS("SELECT * FROM CurExtract");
I set an alert after this line but it doesn't pop up.
ANY HELP WOULD BE VERY GREATLY APPRECIATED. I'll be checking this very frequently.
Hello, this is my first post (anywhere ever)!:eek:
While I have lots of Access programming experience over the years I have broken new ground this week and am in unchartered territory and need help please!
In the organization I am working for (as Procurement Manger), we use AMMS (by Microwest) for work order generation and inventory management, etc. I have been able to import into Access the tables of interest from this SQL-based package. The problem is that I need to share the tables (via nice front end forms/queries) with about 20-30 people in the field.
I don't know much about ODBC but the administrator of AMMS was kind enough to give me access to the AMMS database tables via ODBC and I, personally have access to read the table data but none of the other people in the field can access these tables due to security rights.
So, what I have done is I created MS Access tables for each of the 4 AMMS tables of interest and I run code that runs delete and append queries on each table. I then have a separate public db that the field people access with all the queries and forms but only links to the Master db containing the 4 Access tables derived from the ODBC tables. This works ok but there are issues:
1) if any field people are on the Public db, the code to import the ODBC table data loops and does not complete the delete/append cycle on one or more of the tables. I can only refresh the table data when nobody is connected to the db - impractical.:(
2) the ODBC tables are rather large - one is over 38,000 records and it takes several minutes to run the delete/append queries.:mad:
3) When I created the Master db it was some 83MB. After running the delete/append queries it is some 179MB and appears to increase in size every time I run the delete/append code. When I run "compact db" it stops running after a short time. Does nothing but create a new file (db1.mdb) of the same huge size as the Master.:confused:
I suspect the most graceful solution would be to give each user rights to the ODBC tables from AMMS in Access. In this case, I wouldn't have to run delete/append queries and the data would always be in relative real time subject to the refresh timer. Unfortunately, due to AMMS licensing restrictions, this is not doable.
I have tried to search the internet for guidance but no luck. This forum appears to be an excellent opportunity to get expert advice on this particular issue. I thank you for your thoughts and guidance.
We are using Access 2000 as our front end and SQL 2000 as the back end. We use ODBC to connect to the SQL database. One of my access 2000 programs was getting a little sketchy. So I created and new access 2000 database and imported all the modules, macros, reports, queries and tables. That all worked just fine accept now every time I open the new database it ask me to log in, I think it’s the ODBC connection. I have run table link manager, but it still asked me to log in. I have six other Access databases and none of them ask me to log in. So what am I missing?
Requirement - To generate a report from a remote database
Methods opted - 1. Excel - Connect remote database via odbc connectivity for the required query - Excel generates the report and it can be refreshed when required
2. Access - Connect remote database via odbc connectivity using link tables - Generate report by writing a query on the linked table - Since it is linked, it gets refreshed automatically
I want to go for ms access option since database is increasing day by day and excel will not be hold it.
But linking tables takes more time. Can you please suggest to extract data from remote database without linking tables?
It is not required to link the database in real time ie., No automatic refresh of data is required. Periodic refresh is enough. Not the whole table is required to be linked. Query which returns current year data from the database is enough to generate the report. So, is there anyway to link query in ms access? Please let me know how to connect remote database fastly?
i am using access as a front end to SQL Server 2005 and link tables via ODBC.
Today when I run a query (normally works fine) I receive an ODBC Failed message box. I have tried opening each link table connected to the query and can open fine.
I'm using Microsoft Query to get data from a MS Access database into MS Excel. It seems that whenever I pull data from a UNION QUERY or SELECT QUERY based on a UNION QUERY I get an error message:
I am creating an Access database that will be used by multiple users. This database will be on the network and will be the front end of an oracle database connected to it via ODBC. Do I have to set up the ODBC to oracle only on the machine that hold the database on the network or do I have to set up an ODBC on each user's machine?