Showing posts with label mdac. Show all posts
Showing posts with label mdac. Show all posts

Monday, March 12, 2012

OLEDB & Recordset

Hi Guys,
I'm busy trawling through documentation trying to puzzle out an issue I'm
having. Am about to tackle the SDK.
OK, I'm using MDAC 2.8. Visual Basic 6 and SQL2000 SP3a.
If I execute the following code through a normal ODBC connection (In Admin
tools), I get a result. Works fine.
If I execute the same code, using a UDL file using the "OLE DB
Provider for SQL Server", I get the following error when trying to grab the
value "Item cannot be found in the collection corresponding to the requested
name or ordinal". Also, if i assign a watch to the recordset using the OLEDB
provider,
a lot of the values are unavailable as the object is "Closed"
Dim rs1 As New ADODB.Recordset
Dim BarCode_Database As New ADODB.Connection
Dim sSql As String
sSql = "EXEC SP_Next_Position"
On Error GoTo Error
BarCode_Database.Open Connection_String
Set rs1 = BarCode_Database.Execute(sSql)
Get_Next_Barcode_Position = CStr(rs1!Current_Position)

I've tried messing around with Cursor possition and the like. Maybe I just
havn't hit the right combination :P .
Can anyone steer me in the right direction please?
MUCH appreciated,
Glynn
And what is Connection_string? From the code snippet and
from what you describe, it doesn't look like you are
actually opening a connection.
You'd open the connection using a UDL file with something
like the following on one line:
BarCode_Database.Open
"File Name=c:\PathTo\YourFile.udl"
Refer to the following for more information:
How To Use Data Link Files with ADO
http://support.microsoft.com/?id=189680
-Sue
On Fri, 28 Jan 2005 17:40:27 +0200, "Glynn"
<wwgze@.woolworths.co.za> wrote:

>Hi Guys,
>I'm busy trawling through documentation trying to puzzle out an issue I'm
>having. Am about to tackle the SDK.
>OK, I'm using MDAC 2.8. Visual Basic 6 and SQL2000 SP3a.
>If I execute the following code through a normal ODBC connection (In Admin
>tools), I get a result. Works fine.
>If I execute the same code, using a UDL file using the "OLE DB
>Provider for SQL Server", I get the following error when trying to grab the
>value "Item cannot be found in the collection corresponding to the requested
>name or ordinal". Also, if i assign a watch to the recordset using the OLEDB
>provider,
>a lot of the values are unavailable as the object is "Closed"
>--
>Dim rs1 As New ADODB.Recordset
>Dim BarCode_Database As New ADODB.Connection
>Dim sSql As String
>sSql = "EXEC SP_Next_Position"
>On Error GoTo Error
>BarCode_Database.Open Connection_String
>Set rs1 = BarCode_Database.Execute(sSql)
>
>Get_Next_Barcode_Position = CStr(rs1!Current_Position)
>
>--
>I've tried messing around with Cursor possition and the like. Maybe I just
>havn't hit the right combination :P .
>Can anyone steer me in the right direction please?
>MUCH appreciated,
>Glynn
>

OLEDB & Recordset

Hi Guys,
I'm busy trawling through documentation trying to puzzle out an issue I'm
having. Am about to tackle the SDK.
OK, I'm using MDAC 2.8. Visual Basic 6 and SQL2000 SP3a.
If I execute the following code through a normal ODBC connection (In Admin
tools), I get a result. Works fine.
If I execute the same code, using a UDL file using the "OLE DB
Provider for SQL Server", I get the following error when trying to grab the
value "Item cannot be found in the collection corresponding to the requested
name or ordinal". Also, if i assign a watch to the recordset using the OLEDB
provider,
a lot of the values are unavailable as the object is "Closed"
Dim rs1 As New ADODB.Recordset
Dim BarCode_Database As New ADODB.Connection
Dim sSql As String
sSql = "EXEC SP_Next_Position"
On Error GoTo Error
BarCode_Database.Open Connection_String
Set rs1 = BarCode_Database.Execute(sSql)
Get_Next_Barcode_Position = CStr(rs1!Current_Position)
I've tried messing around with Cursor possition and the like. Maybe I just
havn't hit the right combination :P .
Can anyone steer me in the right direction please?
MUCH appreciated,
GlynnAnd what is Connection_string? From the code snippet and
from what you describe, it doesn't look like you are
actually opening a connection.
You'd open the connection using a UDL file with something
like the following on one line:
BarCode_Database.Open
"File Name=c:\PathTo\YourFile.udl"
Refer to the following for more information:
How To Use Data Link Files with ADO
http://support.microsoft.com/?id=189680
-Sue
On Fri, 28 Jan 2005 17:40:27 +0200, "Glynn"
<wwgze@.woolworths.co.za> wrote:

>Hi Guys,
>I'm busy trawling through documentation trying to puzzle out an issue I'm
>having. Am about to tackle the SDK.
>OK, I'm using MDAC 2.8. Visual Basic 6 and SQL2000 SP3a.
>If I execute the following code through a normal ODBC connection (In Admin
>tools), I get a result. Works fine.
>If I execute the same code, using a UDL file using the "OLE DB
>Provider for SQL Server", I get the following error when trying to grab th
e
>value "Item cannot be found in the collection corresponding to the requeste
d
>name or ordinal". Also, if i assign a watch to the recordset using the OLED
B
>provider,
>a lot of the values are unavailable as the object is "Closed"
>--
>Dim rs1 As New ADODB.Recordset
>Dim BarCode_Database As New ADODB.Connection
>Dim sSql As String
>sSql = "EXEC SP_Next_Position"
>On Error GoTo Error
>BarCode_Database.Open Connection_String
>Set rs1 = BarCode_Database.Execute(sSql)
>
>Get_Next_Barcode_Position = CStr(rs1!Current_Position)
>
>--
>I've tried messing around with Cursor possition and the like. Maybe I just
>havn't hit the right combination :P .
>Can anyone steer me in the right direction please?
>MUCH appreciated,
>Glynn
>

ole db, odbc, mdac what does enterprise manager register server use?

I hear a lot about different ways of pulling data off of sql servers.
When you go to register a server in enterprise manager what method of
data access is it using? ole db, odbc, ?
"tbone" <tony.despain@.gmail.com> wrote in message
news:1139251537.917459.100430@.g44g2000cwa.googlegr oups.com...
>I hear a lot about different ways of pulling data off of sql servers.
> When you go to register a server in enterprise manager what method of
> data access is it using? ole db, odbc, ?
>
My best guess is that it is using the SQL-DMO API. How the API is
connecting, who knows. I would guess that it is either using SQL OLE-DB, or
it may be using DBLib.
Rick Sawtell
MCT, MCSD, MCDBA

ole db, odbc, mdac what does enterprise manager register server use?

I hear a lot about different ways of pulling data off of sql servers.
When you go to register a server in enterprise manager what method of
data access is it using? ole db, odbc, ?"tbone" <tony.despain@.gmail.com> wrote in message
news:1139251537.917459.100430@.g44g2000cwa.googlegroups.com...
>I hear a lot about different ways of pulling data off of sql servers.
> When you go to register a server in enterprise manager what method of
> data access is it using? ole db, odbc, ?
>
My best guess is that it is using the SQL-DMO API. How the API is
connecting, who knows. I would guess that it is either using SQL OLE-DB, or
it may be using DBLib.
Rick Sawtell
MCT, MCSD, MCDBA

ole db, odbc, mdac what does enterprise manager register server use?

I hear a lot about different ways of pulling data off of sql servers.
When you go to register a server in enterprise manager what method of
data access is it using? ole db, odbc, ?"tbone" <tony.despain@.gmail.com> wrote in message
news:1139251537.917459.100430@.g44g2000cwa.googlegroups.com...
>I hear a lot about different ways of pulling data off of sql servers.
> When you go to register a server in enterprise manager what method of
> data access is it using? ole db, odbc, ?
>
My best guess is that it is using the SQL-DMO API. How the API is
connecting, who knows. I would guess that it is either using SQL OLE-DB, or
it may be using DBLib.
Rick Sawtell
MCT, MCSD, MCDBA

Monday, February 20, 2012

Old MDAC changes, 2.1 - 2.5

We have a large project that is importing msado21.tlb. We want to import least msado25.tlb to access the ADODB::_Stream object, but are unsure what exactly this entails. I've noticed no problems testing that change, but I cannot find any changelog for the MDAC upgrade. Is anyone aware of, or can point me to, a list of changes (fixes, modifications, caveats, etc) between MDAC 2.1 and MDAC 2.5? The binary msado file is always much newer, of course, but we want to link with the older type libraries to maintain maximum compatibility.

Any help is appreciated, I'm at a dead end!

Some of the MDAC 2.5 changes are discussed here: http://msdn2.microsoft.com/en-us/library/ms810823.aspx#mda_comp

You can look at the readme for 2.5 RTM which discusses the changes for that version.
See the download for MDAC 2.5 and find MDAC readme html file in the package. http://www.microsoft.com/downloads/details.aspx?FamilyID=83e8f178-94c9-4e7d-b0b6-a8a94c4eb912&DisplayLang=en