r/SQLServer • u/FlyCompetitive6817 • Feb 09 '26
Question Access DB front end SQL server backend
I have been using a Access DB for a few years to store info that is parsed through a loader form into tables. We have outgrown Access and have uploaded the DB to a SQL server. I am still using Access as the front end and linked to the SQL server. I have tried using the loader form in the Access front end(as I did with Access) to load the parsed data into the tables on the SQL tables. It starts, but ultimately fails with a runtime error 3146. The files are CSV/TSV files that are separated into folders by drop. Does anyone have any experience with this type of file parsing and moving from Access to SQL for the backend?
5
u/Eleventhousand Feb 09 '26
Besides the BCP that u/smolhouse mentioned, SQL Server Management Studio does have an Import/Export wizard. The downside with it is that it's sometimes brutal to use with column mapping resolutions. It might be easier to have it create a new table and then load from that new table with SQL, then drop the new table.
Another option would be to write a Python script to move the files into SQL Server.
A third option, if the files are small enough, is to open them in Excel, and then use string concatenation in a new column in Excel to build up an insert statement. Then, copy and paste those insert statements into SSMS.
1
u/dinosaurkiller Feb 09 '26
What are you using to load from CSV/TSV to SQL?
2
u/smolhouse Feb 09 '26
I don't know the specifics of what you're doing but BCP utility has been the fastest way to transfer access data to a SQL server in my experience.
2
u/RuprectGern Feb 11 '26
you have many options... you could use
Then there is PowerShell, python and a host of other programmatic solutions.
1
u/killit Feb 09 '26
I haven't done what you're trying, but this might help if you haven't been through it already: https://support.microsoft.com/en-gb/office/migrate-an-access-database-to-sql-server-7bac0438-498a-4f53-b17b-cc22fc42c979
1
u/AccessHelper Feb 09 '26
You are getting an odbc error but there could be a lot of different reasons for it. Typical ones would be duplicate key fields or duplicate data on fields with unique indexes. Others could be invalid data. For example a date field in Access could have old dates due to typos such as 12/31/1600 and SQL won't take it.
1
u/TerribleTodd60 Feb 09 '26
I do this kind of thing for a living. DM me if you want me to take a look at what you have
1
u/7amitsingh7 Feb 25 '26
The runtime error 3146 in Access usually occurs when Access cannot execute a query against SQL Server, which is common when moving from an Access backend to SQL Server because the engine enforces stricter rules on data types, nulls, and constraints(you can refer to this article for better understanding the error). To resolve this, make sure your Access front end is connected via a proper ODBC DSN with sufficient permissions, verify that your loader queries or VBA code are compatible with SQL Server syntax, and check that the tables exist with the expected schema. Large CSV/TSV files can also cause timeouts, so for high-volume imports, consider using SQL Server’s BULK INSERT, bcp, or SSIS. Testing with smaller files or direct inserts via SSMS can help isolate the issue before attempting full-scale imports.