|
-
Trying to read binary data from a Access database file.
I am trying to read a binary field from an access database using ADO.
I have tried several different examples and all seem to yield the same error
message.
When the line executes that supposed to retrive the data I get the error:
Run-Time Error: 3219
Operation is not allowed in this context.
Can somebody tell me what I'm doing wrong.
Here is the code:
Dim Conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim strData As String
Set Conn = New ADODB.Connection
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\DB\mydb.mdb;Persist
Security Info=False"
Conn.Open
Set rs = New ADODB.Recordset
sSql = "Select * from Media"
rs.Open sSql, Conn, adOpenKeyset, adLockPessimistic
strData = rs("MediaFamilyGuid").GetChunk(rs*("MediaFamilyGuid").ActualSize)
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks