|
-
May 9th, 2005, 11:41 PM
#1
Thread Starter
Hyperactive Member
RUNTIME ERROR '3146'..ODBC-Call Failed
Hi..
Im using SQL server as my backend and MS Access as F.E..
Im using to update around 10 to 20 records one by one by upto 2 to 3 records it was updating, later for 4th record it was saying "RUNTIME ERROR '3146'..ODBC-Call Failed"(at "rst.update" it was showing)
..at that time if i start agian from "rst.addnew" then for upto 3 to 4 it was okay..Is there any limitation in adding records.???
FYI: Im not getting if i update 1 or 2 records..and
one more thing that i came to know was ,If the table was a ordinary Access Table..Im not getting any error..
One more thing was If i place some time delay using msgbox (like msgbox "Updated..." for example)that means for each record I placed a message updated..then it was working perfectly on to my surprise..
Please help me in this regard..Please..
Thanks & regards
Anu...
-
May 9th, 2005, 11:46 PM
#2
Re: RUNTIME ERROR '3146'..ODBC-Call Failed
Sounds like your updating/adding records through Access tables/queries and not directly to the SQL tables? Alos, probably
using a recordset to add/update when you could execute a sql INSERT statement or an sql UPDATE statement.
Recordsets are slow. You can create a connection to SQL using ADO, DAO, ODBC to perform your actions.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 9th, 2005, 11:59 PM
#3
Thread Starter
Hyperactive Member
Re: RUNTIME ERROR '3146'..ODBC-Call Failed
Hi Rob,
Thanx for u r quick reply..
But Im using SQL tables it self,(Sql tables are linked in my database..)
and whenever i want to insert new records im opening a connection using
set rst=currentdb.openrecordset(sql string.......)
and im inserting a new row by using AddNew and Update methods (not by using sql Queries)
What i have to do speed up my recordset..Please help..
Thanx & Regards
Srikanth
-
May 10th, 2005, 12:09 AM
#4
Re: RUNTIME ERROR '3146'..ODBC-Call Failed
The slowness is from Access having to connect its linked ODBC connection to your SQL db/table via a rs. You could
execute a statement like so.
VB Code:
Dim lRecs As Long
Access.CurrentDb.Connection.Execute "INSERT INTO Table1 VALUES('Testing')", lRecs
MsgBox lRecs & " records added", vbOKOnly + vbInformation
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|