473,323 Members | 1,560 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,323 software developers and data experts.

currentdb.execute odbc--call failed error #4134

7
Ben,
Hi,
First of all, here are my work tools : I have an Access 2003 app that uses an SQL Server DataBase (i know it's weird). I am using Microsoft SQL Server Management Studio Express.
I am now trying to execute a query from my app to insert some rows from 2 tables into another. My query works well when i use it rigth into SQL Server Management or when i create a new query in Access, but it don't work in my app... It gives me the "ODBC Call failed" error for an unkwown reason that i can't discover because my query works well in other situations...
Nov 28 '12 #1
14 3410
Rabbit
12,516 Expert Mod 8TB
It's hard to say what's wrong without seeing the code.
Nov 28 '12 #2
NeoPa
32,556 Expert Mod 16PB
See if you get the same error if you do a simple SELECT query on the ODBC linked table only. This will indicate whether the issue is with the ODBC setup exclusively, or whether the actual query you were working on has any bearing on the issue.
Nov 28 '12 #3
bfuchs
7
hi to all, thanks for your reply!
the error is a timeout from the server
its being stuck at the following line
CurrentDb.Execute sSql, dbSeeChanges
again, nothing is wrong with the sql, as i copy it to a query it works fine, with no delay at all!
Nov 28 '12 #4
ck9663
2,878 Expert 2GB
How big is the returned result set? You might need to change you setting so it can handle the return of the data set.

Good Luck!!!


~~ CK
Nov 28 '12 #5
bfuchs
7
fyi- its an append query, in this case it has just one record to apply.
Nov 28 '12 #6
NeoPa
32,556 Expert Mod 16PB
Ben, what happened when you tried the test I suggested in post #3?
Nov 28 '12 #7
bfuchs
7
hi, when selecting opening etc its all fine, just going thru code that fails
Nov 28 '12 #8
NeoPa
32,556 Expert Mod 16PB
That's curious. Is that the exact and full error message you get?

It seems to imply the problem is with the ODBC connection, yet you confirmed that isn't the case by testing for it explicitly. Did the results come back immediately? How long did the test take to produce results if that's measurable?
Nov 28 '12 #9
bfuchs
7
it took few seconds in query, while in code it runs forever...
even when trying to run the query thru code it fails.
Nov 28 '12 #10
NeoPa
32,556 Expert Mod 16PB
Well Ben, we haven't seen your code yet (unfortunately. It has been requested). However, the test of the SELECT SQL I suggested should definitely be run in the same way as the other query you have the problems with, otherwise it's hardly a valid test. I'm disappointed that you didn't explain this after I had to prompt you for the results originally, but only thought to mention it after I prompted you again. I fail to see how your response could be considered accurate in the circumstances you've just described. I get the impression you can't really be bothered - and that's on your own problem.

Frankly, I'll be looking for an indication of a change in attitude if I'm to expend any more effort on your behalf.
Nov 28 '12 #11
bfuchs
7
Hi Neo, i appreciate you efforts to help me, and apologize for the misunderstandings.. its just that am in middle of converting a database and this is only one of the issues standing on my way..
to make a long story short, these 2 lines for example gives me that exact error :
Expand|Select|Wrap|Line Numbers
  1. CurrentDb.Execute "delete * from  PES where id = " & CLng(sID), dbSeeChanges
  2. CurrentDb.Execute sSql, dbSeeChanges
Thanks
Nov 29 '12 #12
NeoPa
32,556 Expert Mod 16PB
I appreciate your position Ben, but without your full involvement there is very little we can do to help (Unless someone happens to know about your particular problem from experience). What we can try to do is to work with you, but that relies on you doing the hands-on work. We can't test for you. We can't even ensure you do the tests properly. We can only offer suggestions for you to try.

In this case, your code is helpful, but as it's dealing with the execution of SQL commands, there is little we can tell without seeing the strings passed. Here's a pointer to how to deal with SQL problems generally - Before Posting (VBA or SQL) Code. Some of these you may appreciate already, but hopefully it explains why some of these disciplines are important and helps you to get help.

Again, I understand if you don't have the time available to pursue this properly, but I would suggest that it's not worth anyone's time and effort unless you do. I'll leave that thought with you.
Nov 29 '12 #13
bfuchs
7
Congratulations!! After few days digging into this issue, i finally found the problem, in reward for your time, will share with you my experience...

The code was placed on the before delete event of the form, since apparently access already sends a delete request for sql agent on this record, therefore querying this row was sort of blocked by that pending delete process...solution-just placed the code on the delete event and it works!

Thanks allot for your efforts.

Ben
Nov 29 '12 #14
NeoPa
32,556 Expert Mod 16PB
I'm not sure I managed to help much Ben. It seems the issue was a complex one, but not related to anything described in here by the sound of it. Hopefully, at least the position of having to stop and look at the problem from an outside perspective enabled you to see the problem. Not an easy one to discover certainly.
Nov 29 '12 #15

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Bon | last post by:
Hello All I got "Tables are skipped or export failed" error when I used upsizing wizard on migrating MS Access 2000 to MS SQL Server 2000. I am changing my application backend database from MS...
3
by: shreedhar | last post by:
If I try to delete a record from my table which is giving following error Warning: PostgreSQL query failed: ERROR: pg_atoi: zero-length string in /xxx/database.inc on line 73 What might be...
1
by: GSteven | last post by:
I have a statemnt which says: CurrentDb.Execute strSQL, dbFailOnError where strSQL is a create query. Is there an overwrite option for the execute method so thath I don't get the 'file already...
3
by: ralphdepping | last post by:
Trying to get moinmoin wiki working on Windows 2000 using IIS and python. I get the following error when trying to view the start page after insalling moinmoin and python - key error seems to be...
0
by: t0nt0n | last post by:
i have an xp OS service pack 2 currently working on a project that uses ms access 2003 with mysql 5.0 backend... i get an odbc--call failed error when I manually changed the system date in my...
1
MitchR
by: MitchR | last post by:
Hello Folks; I have run myself into a hole I cannot get of and need some assistance. I have a Form "Frm_ATandT_Activation_Center" that has a sub form "Frm_ATandT_Activation"....
13
by: matt753 | last post by:
Can anyone tell me whats wrong with this SQL statement? CurrentDb.Execute("INSERT INTO Joblist2Data (ID, DayUsed, Employee, Priority, Item, Task, Comments, Complete) VALUES (" & Null & ", #" & 5 /...
1
by: aurekha | last post by:
Hi All, Im newbie to Perl. My problem is that, when i run my script, It is showing the error like "DBI connect('blah','blah',...) failed: ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var...
2
by: Higgs | last post by:
Hello, I have a function "ParseFileName" which removes the ".txt" in the file name which is stored in the variable varItem: Public Function ParseFileName(varItem As String) As String x =...
4
TheSmileyCoder
by: TheSmileyCoder | last post by:
I have been playing around with transactions and one thing got me wondering. First is the code I am using: 'Start transaction 'Get default Workspace. Dim wrkDefault As...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.