ODBC/OLEDB Failure Accessing MS Access Attachment Field In Query
Mar 12, 2008
We are experiencing failures when accessing a datatype="Attachments" field in a query in an MS Access 2007 database using ACE ODBC or OLEDB drivers.
We are using an MS Access 2007 database
ACE ODBC/OLEDB drivers installed (i.e. Office 2007, which installs these drivers)
DB contains a table with a field of type "Attachments" (which is new in MS Access 2007)
DB contains a query that selects the fields of the above table
Using ACE ODBC or ACE OLEDB drivers to display the table works fine. The "Attachments" field is displayed as the file name of the attachment(s).
However, using either ACE ODBC or ACE OLEDB to display the query (i.e. NOT the table) results in either incorrect results or unexpected failures of the ODBC/OLEDB drivers.
Error using ODBC (using "ODBC Test"):
=============================
select * from Query1 does not give an error, but displays a "1" for the Attachment field.
select Attachments from Query1 gives the following error:
stmt: szSqlState = "HY000", *pfNativeError = -3087, *pcbErrorMsg = 97,
*ColumnNumber = -2, *RowNumber = -2
MessageText = "[Microsoft][ODBC Microsoft Access Driver] Reserved error (|);
there is no message for this error."
Error using OLEDB (using "RowSetViewer"):
================================
select * from Query1 gives the following error:
Interface: Unknown
Result: 0x0004001 = E_NOTIMPL
FormatMessage: €œNot implemented
File: F:DepotSQLVaultmdac28sdkSamplesoledb
owsetviewerSDKobji386CRowset.cpp
Line: 616
select Attachments from Query1 gives the following error:
Interface: IID_ICommand
Result: 0x0004005 = E_FAIL
IErrorInfo: [0x0000f3f1] €œUnspecified error€?
File: F:DepotSQLVaultmdac28sdkSamplesoledb
owsetviewerSDKobji386CCommand.cpp
Line: 439
If it would help to analyze the problem, I have a folder containing all pertinent files (bare-bone database, tools, instructions) to reproduce this. I could attach it as a ZIP file, if requested.
Thanks,
Joe
View 1 Replies
ADVERTISEMENT
Jan 10, 2008
I have the following query for my site which was functioning great using the OLEDB driver. Unfortunately, my client's web host forced us to use ODBC and it is no longer working Any suggestions for what I should do?
Here is the query:
SELECT t.*
FROM (SELECT TOP 10 itemnum, itemnum FROM (
SELECT TOP 100 itemnum, itemnum
FROM(CatView)
WHERE [CATALOG PAGE] LIKE 'SM%'
ORDER BY itemnum ASC) AS foo
ORDER BY itemnum DESC) AS bar INNER JOIN CatView AS t ON bar.itemnum = t.itemnum
ORDER BY bar.itemnum;
Here is the error i'm now receiving:
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] The specified field 'itemnum' could refer to more than one table listed in the FROM clause of your SQL statement.
I know it was working great before, so i'm not sure what to do.
Michael
View 3 Replies
View Related
Nov 6, 2007
I have a report that accessed a Visual FoxPro 6.0 database via ODBC. Since I upgraded to Visual FoxPro 9.0, now I am getting the error:
Query Server Error
DMS-E-RBI_TABLE The table or view <table name> was not found in the dictionary
I've verified that the right path is setup and I've tried installing about every driver and none of them are working. I created a new database in 9.0 and the I can access it fine. Also, there are old tables that are accessible in the same path, just not the ones I need. Any ideas would be helpful..
View 1 Replies
View Related
Oct 5, 2005
Hello everyone,
Please i need your help...
I dont know how to place the field 'strTitle and datBorrowed " in my email? Not as an attachment though....Just write it in the mail as part of message body...
I use this SQL select statement to retrieve the strTitle and datBorrowed fields
strSQL += @"Select replace(strtitle,'[Original Book] - ',''), datBorrowed from tblBooks where convert(varchar(10),datBorrowed,101) = convert(varchar(10),(getdate() - 1),101) ORDER BY strTitle asc";
Now, I have the following code to write the email
static void SendTest()
{
int iEmailLanguage = 0;
MailMessage objMail;
objMail = new MailMessage();
objMail.From = MAIL_FROM;
objMail.To =MAIL_TO;
objMail.Subject = "Books Borrowed Yesterday";
objMail.Body = Dict.GetVal(iEmailLanguage, "EMAIL_MESSAGE");
objMail.Attachments.Add(new MailAttachment(strAttachment));
SmtpMail.SmtpServer = SSMTP_SERVER;
SmtpMail.Send(objMail);
}
And the body of the email is this......
Dict.AddVal(0, "EMAIL_MESSAGE", "*** This e-mail is automatically generated. ***" +
"*** PLEASE DO NOT REPLY TO THIS E-MAIL. ***" +
"" +
"Books Borrowed Yesterday are:" +
"" +
"" +
"Thank you," +
"" +
"eLibrarian" +
"" +
"================================================== ===============" +
"" +
"This e-mail is automatically generated by the Library system." +
"Please do not reply.");
i need to put or wedge the data i got from the SQL Statement into this or after the line "Books Borrowed Yesterday are:" +
So how should i do this?
View 3 Replies
View Related
Aug 8, 2002
Is anyone using OLEDB instead of ODBC? If so why did you choose to use OLEDB vs ODBC? Our application is written in VB and we have a developer that believes switching to OLEDB from ODBC would be beneficial to us. Please give any information that you have! Thanks.
View 1 Replies
View Related
Jan 13, 2004
I am working on a large ASP application(s) which uses SQL Server 2K on the back end, ADO 2.7 for Data Access. The current connection strings are setup to use older ODBC drivers. I wanted to change them to OLEDB for performance gains and better support in the future.
The problem encountered is that once the driver is changed the pages become riddled with errors. There are many piece of ADO code that are supported using the new driver. Many are cursor issues or code dealing with identity columns.
Has anyone else gone through this process?
Is there a comprehensive listing of those methods that are not compliant between these two drivers?
Any input would be appreciated....Thanks
View 5 Replies
View Related
Feb 6, 2007
I want to know the difference between SQL ODBC and SQL OLEDB.
View 1 Replies
View Related
Feb 6, 2007
What are ODBC and OLEDB
1)libraries or
2)standards
View 4 Replies
View Related
Jan 12, 1999
We are trying to extract data from DB2 on an as400 machine. Can we simply use SQL statements to extract the proper data that we need from as400 using the SQL Server 7.0 functionality? How do we do that?
We think this needs to be done via DTS(Data Transformation Service).
Thanks in advance.
Shaikh & Sande.
View 1 Replies
View Related
Mar 6, 2006
i notice that in toolbox panel, there are these kind of different dataadapter and dataset, what is difference between them, and under which situation we use which one?
View 2 Replies
View Related
Feb 19, 2015
I have a SSIS pkg that gets data from SQL and do data conversion and Insert into OLE db AS400 destination, There is a flag column in SQL table , that has to be updated to true, once the records are inserted in AS400 how do i do that in SSIS
SQL oledb ---------> dataConversion ---------------> AS400 OLE db Destination
|
update SQL table Flag column<---------------------------------|
View 9 Replies
View Related
May 28, 2008
Hi all, I'm setting up an ODBC connection for the UPS WorldShip application. I created a view for the shipment data in my database. The user account I'm using can only access the view, and when I try to connect it says there are no tables. Is there a way to make ODBC "think" the view is a table? TIA! - Mark
View 4 Replies
View Related
May 13, 2007
Hi,
I am using VB.NET 2005 and set up an ODBC connection via ODBC.ODBCConnection to a MDB database. Therefor, I use the "Microsoft Access ODBC Driver (*.mdb)".
When I set up a ODBCCommand like "ALTER DATABASE..." or "CREATE TABLE..." and issue it with the com.ExecuteNonQuery() command, I get an error from ODBC driver, that a SQL statement has to begin with SELECT, INSERT, UPDATE or DELETE.
How can I use DDL statements via ODBC?
I would appreciate if you could help me to use ODBC for that - no OLE, no ADO.
Thanks for help!
Regards,
Stefan D.
View 14 Replies
View Related
May 5, 2008
I have recently switched from ODBC to OLEDB and I have noticed a difference in the way these two handle local temp tables. With ODBC the scope of the local temp tables is the connection in which they were created (unless they are created in a stored proc, in which case the scope is the stored proc). That means you can create the temp table in one statement, fill it with data in another and retrieve the data in the third, and everything works fine as long as these statements are bound to the same connection. I have used this in a few places in my applications as a way to store connection specific data and a way to simplify some other things.
But now I have a problem. In OLEDB the scope of the temp tables is the session it was created in and that is not good for me since I can not store connection specific data in temp tables any more.
Any ideas?
Thank you!
View 1 Replies
View Related
Apr 10, 2008
Hello,
There is a SQL Server databse installed in my machine.
I want to modify a data in a table.
How can I access the data with ODBC Administration?
Thanks
View 6 Replies
View Related
Jul 20, 2006
Hello,
This started as a simple thing, allow somebody to access to a database on a SQL 2005 server so they could get to it from MSAccess. I have created a login (Windows Authentication) so they can see the database and gave them "public" and "datareader" abilities.
The user then informed me that while they could see the views they could not see the data. Not being a DBA (sorry) I added "public" to the view's permissions (under properties) and granted it "Select" access and nothing else. After I completed this the user could not even see the views to pick them (via the ODBC link from MSAccess) and when I try to remove "public" from the permissions it dissapears, but when I reopen the permission "public" is back.
I then find out there is no data in the views and so the user would not have been able view anything anyway.
So what I want to do is remove "public" from the views permissions, is this possible?
Thanks for any help,
Tyrone
View 4 Replies
View Related
Nov 24, 2006
Hi,
I am migrating from MySQL 5 to SQL Server Express 2005 (SP1) and I am having some remote connections issues. I have tried just about everything that I have read in the forums and in Microsoft's knowledge base about remote connections with SQL Server. I am using Visual FoxPro 9 as my client and connecting with ODBC to SQL Server. The strange thing about my issue is that I can connect just fine with localhost or using my LAN IP address. Before I get to the errors, here is what I have configured:
Remote connections are allowed, TCP is active, SQL Browser service is active and running, my router forwards requests on ports 4567 (my custom port that I setup IP1 in SQL Server Configuration Manager to listen on), 1433 and 1434 (TCP and UDP for all) to my local IP address. My firewall will not block ports 4567, 1433 or 1434 (TCP and UDP for all). I even tried turning my firewall off.
For example, the following connection strings work. The first works when I am at the same computer as my SQL Server, the second works from a different computer on the same LAN.
Driver=SQL Native Client;Server=localhostsqlexpress;Database=xyz;Uid=adm;Pwd=pw
Driver=SQL Native Client;Server=192.168.1.3sqlexpress;Database=xyz;Uid=adm;Pwd=pw
When I try the following connection strings (with either my hostname or internet IP address, I get one of several failures):
Driver=SQL Native Client;Server=my.domain.comsqlexpress;Database=xyz;Uid=adm;Pwd=pw
The above strings yields this error message: [Microsoft][SQL Native Client]SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]
Driver=SQL Native Client;Server=my.domain.comsqlexpress,1433;Database=xyz;Uid=adm;Pwd=pw
Driver=SQL Native Client;Server=my.domain.comsqlexpress,4567;Database=xyz;Uid=adm;Pwd=pw
Using either the SQL default port or a custom port yields this error message: [Microsoft][SQL Native Client]Login timeout expired Connectivity error: [Microsoft][SQL Native Client]TCP Provider: No connection could be made because the target machine actively refused it.
The fact that I can connect with my LAN and not on the internet suggests that my ISP may be blocking port 1433. For this reason I tried to change the port my SQL Server instance was listening on but I have a feeling it isn't working.
Any help would be greatly appreciated as I've been stuck on this problem. Is there any way to test if my SQL server instance is actually listening on my custom defined port? Thanks in advance.
-Tom
View 1 Replies
View Related
Jan 6, 2004
Hello,
I have a SQL Server instance on my local computer and an Oracle
Database on a remote server. I want to run queries from tables
within both databases and am using linked servers to accomplish
this.
I configure my linked server in SQL Server using the Microsoft
OLE DB Provider for Oracle and can run queries using sql server
tables and oracle tables. However, even the simplest queries
take more than 10 minutes to run.
I have the Oracle 9 Client Installed and MDAC 2.7. I configured
my registry settings to match oracle 9's settings.
However nothing i do improves the performance of the queries
through the Microsoft OLEDB Provider for Oracle.
When I use MS Access, or use an ASP page with the following
string:
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "dsn=Oberon;uid=mfs;pwd=mfs;"
I implement the ODBC driver that I configured in my system DSN
and both run the same queries very fast. The data comes back
without a problem.
So i believe I have narrowed down my problem to the OLEDB
Provider. However, SQL Server does not give me a choice to use
the ORACLE native ODBC Provider.
So then I tried using Pass-Through Queries and this worked alot
faster in SQL Server...I am completely confused as to whats
going on.
Linked Server Query that takes over 10 minutes:
SELECT * FROM OBERON..LOGS.DATA_PHOTO ldp where Machine=301 AND C3='I051097';
Pass-Through Query that works faster:
select * from Openquery(OBERON, 'SELECT * FROM LOGS.DATA_PHOTO ldp where MACHINE=301 AND C3=''I051097''')
From researching pass through queries, my understanding is that
it actually uses ODBC to give the whole query to the remote
database where the query is then run and the results are passed
back as a table, thats why you say select * from (query)...however if my understanding is correct, then you cant combine tables in different databases very easily. And will it work with .asp and .aspx pages?
Anybody have any insight as to whats going on?
View 1 Replies
View Related
Jan 12, 1999
We will be converting shortly from 6.5 to 7. We have a widely
used application that currently accesses the SQL 6.5 using SQL Server
odbc driver version 2.6
Will the 2.6 driver work with 7.0 and ff not, what will we have to do to
get it work with 7.0?
Thanks for the info.
Jerry Dunn
ViaHealth
jerry.dunn@viahealth.org
View 1 Replies
View Related
Jul 23, 2005
Hi ,Have a Visual C++ app that use odbc to access sql server database.Doing a select to get value of binary field and bind a char to thatfield as follows , field in database in binary(16)char lpResourceID[32+1];rc = SQLBindCol(hstmt, 1, SQL_C_CHAR,&lpResourceID,RESOURCE_ID_LEN_PLUS_NULL , &nLen1);and this works fine , however trying to move codebase to UNICODE antested the followingWCHAR lpResourceID[32+1];rc = SQLBindCol(hstmt, 1, SQL_W_CHAR,&lpResourceID,RESOURCE_ID_LEN_PLUS_NULL , &nLen1);but only returns 1/2 the data .Any ideas , thoughts this would work fine , nit sure why loosing dataAll ideas welcome.JOhn
View 2 Replies
View Related
Sep 12, 2006
Hello there!
This is my issue: I do have a database which back end is in SQL Server 2005 and front end is in ACCESS 2003. When one of the forms is trying to write duplicate information in any of the tables, there is a message coming "ODBC -- call failure", I wrote code trying to avoid that situation, but is keeps on coming. Does anybody have any idea about how to handle this exception? I would really appreciate a help on this subject.
Thanks;
Luisofo
View 1 Replies
View Related
Mar 15, 2007
My application (written in a proprietary old 4GL) is connecting to a SQL 2000 database via ODBC
This works fine nearly all the time, but occasionally, it throws the following error when trying to connect :
Connection Failed
SQLState '01000'
SQL Server Error: 10060
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Open(Connect()).
Connection Failed:
SQLState '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.
This error is displayed in a Windows dialog box. When the OK button on this dialog is clicked, it throws up a login/password box. When this is filled in and submitted, the connection is usually made cleanly and the application continues.
The big problem is that the application is an unattended service, and this dialog can go unnoticed for quite a while.
If these dialogs are 'Cancelled' rather than 'OK'd, the 4GL receives the error and arranges to re-try the connection itself.
Is ODBC responsible for popping up the interactive dialog, and, if so, can I do anything to force it to return an error instead ?
View 3 Replies
View Related
Apr 7, 2007
I am having a problem getting the ODBC driver to connect.
I just installed VS2005 and can't connect to my SQL2000 server. It is there. I can't connect using either one of the mix mode authentication.
I can login to SQL from another pc when logged in with this user name. It has to be something on this pc blocking it.
Iam not rying to do this from a ASP web page just trying to setup a ODBC driver and I get these errors.
I get the error:" Login failed for user (null)" Not associated with a trusted connection
Thanks
Mike
View 3 Replies
View Related
Dec 21, 1999
I have started to see regular occurences of "ODBC error 40001- serialization failure" in the log of a client website (using cold fusion) and would be grateful for any suggestions on likely causes and solutions. The error message also mentions deadlock victims. Thank you in advance.
View 1 Replies
View Related
Sep 1, 2004
Okay-- if anyone can solve this they are truly the SQL genius! We are getting this error when we run a VB program that we use to access an SQL database on a server across our network on a workstation. In fact we get this same error when we even run the program on the server where the SQL database is running or on any of our workstations. Here is the error message:
08501:[Micorsoft][odbc sql server driver] communications link failure
Now the odd thing is that many other functions in the workstation application work fine and retrieve data from SQL but certain data requests by the workstation application fail with the above error message and we get this message consistently. Even though it appears that different workstations running the identical Vb application will get this error consistently but in different locations when running the application. We were running SQL 6.5 on an old server, with the workstation application for literally years without any problems. We also decided to upgrade to a new server, installed server 2000 operating system and the latest version of SQl -- moved all the databases pointed the workstations odbc at this new server and get exactly the same error in the same location in the workstation applications. The programmer that wrote the application and designed the database in SQL can't find the problem and a number of other computer "experts" also could not find the error. We did add a new linksys DSL router/firewall but everything kept working after this installation for several weeks so I don't know if this is the problem on the network. THe programmer also noted that he had problems using terminal services on our network to connect to his office computer and decided that there must be some network issues that are causing the ODBC communicaitions to fail and also terminal services to fail-- or of course they may be unrelated. Has anyone ever seen this ODBC communication error in their travels through SQL implementations? Any help will be greatly appreciated. If we can't fix this we will have to abandon a software application that has been used for over five years and just too complex to rewrite.
Jeff Kilpatrick
View 3 Replies
View Related
Feb 17, 2012
i am using sp_send_dbmail to send Emails.how to send query result as an attachment with EXCEL Format.
View 1 Replies
View Related
Jul 16, 2014
What is the best way to send emails with query results as attachment?
There is a stored proc sp_send_dbmail but the formatting is not very good.
View 3 Replies
View Related
Nov 2, 1999
I'm "trying" to set up Replication. The Publishing/Distribution server is in one domain, and the subscribing server is in another. Both domains are fully trusted.
The synchronization step builds the .tmp file, but the repl_subscriber Distribution task bites the dust with an error message, "28000[Microsoft][ODBC SQL Server Driver][SQL Server] Login failed".
The setting on the distribution options dialog box is ODBC, SQL Server. I'm not using a special login/password. I've even tried putting a user name and password there, and it doesn't work. The ODBC connections test out fine on both servers. Any suggestions where I've gone wrong?
Thanks,
Layne
View 3 Replies
View Related
Sep 22, 2004
We get this error constantly...
24.121.0.118, Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322), ODBC Error Code = 40001 (Serialization failure) [Microsoft][ODBC SQL Server Driver][SQL Server]Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
Any ideas? Would setting the isolation level to Read Commited help?
View 1 Replies
View Related
Dec 29, 2006
Can some one help me with this ?
C:WINDOWSsystem32Odbc32.dll
Version:
3.525.1117.0
SQL_SUCCESS_WITH_INFO (1) in OdbcConnection::connect
sqlstate=01000, level=-1, state=-1, native_error=444, msg=The driver returned invalid (or failed to return) SQL_DRIVER_ODBC_VER:
sqlstate=01000, level=-1, state=-1, native_error=5701, msg=[Microsoft][SQL Native Client][SQL Server]Changed database context to 'master'.
sqlstate=01000, level=-1, state=-1, native_error=5703, msg=[Microsoft][SQL Native Client][SQL Server]Changed language setting to us_english.
SQL_ERROR (-1) in OdbcConnectionHandle::set_attr
sqlstate=IM001, level=-1, state=-1, native_error=0, msg=[Microsoft][ODBC Driver Manager] Driver does not support this function
SQL_ERROR (-1) in OdbcConnectionHandle::get_attr
sqlstate=IM001, level=-1, state=-1, native_error=0, msg=[Microsoft][ODBC Driver Manager] Driver does not support this function
SQL_ERROR (-1) in OdbcHandle::release
sqlstate=HY010, level=-1, state=-1, native_error=0, msg=[Microsoft][ODBC Driver Manager] Function sequence error
SQL_ERROR (-1) in OdbcHandle::release
sqlstate=HY010, level=-1, state=-1, native_error=0, msg=[Microsoft][ODBC Driver Manager] Function sequence error
Error Code: 0x8007ea74 (60020)
Windows Error Text: Source File Name: libodbc_handle.h
Compiler Timestamp: Wed Oct 26 16:37:41 2005
Function Name: OdbcConnectionHandle::set_attr@connect
Source Line Number: 168
---- Context -----------------------------------------------
Connecting to SQL Server
ExecuteSqlCommands
Originial error was 8007ea74 (60020)
ipt
SqlScriptHlpr
Error Code: 60020
MSI (s) (D0!0C) [18:24:47:187]: Product: Microsoft SQL Server 2005 Express Edition -- Error 29521. SQL Server Setup failed to execute a command for server configuration. The error was [Microsoft][ODBC Driver Manager] Driver does not support this function. Refer to the server error logs and Setup logs for detailed error information.
View 1 Replies
View Related
Jan 2, 2014
Is there a way to export query results to an excel fie and add that file as an attachment in the email? All this has to be done using SQL query and it needs to be automated. My coworker tried using Openrowset and BCP, but it is not working.
View 3 Replies
View Related
Aug 29, 2002
All,
I need a help from you all. I am getting this error if the users are running the application which is connecting from MSAccess97 to SQL Server 2000.
Error: [Microsoft][ODBC SQL Server Driver]Communication link failure
I would appreciate if you send me the resolution for this problem.
Thanks,
Reddy
View 1 Replies
View Related
Nov 16, 2005
I get the message Microsoft [ODBC Sql server driver]communication link failure error message in my VB 6 application with MSDE engine. This error does not happen often.
My connection string is as below.
"Provider=MSDASQL;Driver={SQL Server};Server=" & mSvrName & ";DATABASE=cnsClient;uid=uid;pwd=pwd"
Please help.
View 1 Replies
View Related