Showing posts with label odbc. Show all posts
Showing posts with label odbc. Show all posts

Wednesday, March 28, 2012

problems in editing a record... why? help pls....

can someone help me why it produces an error...

error is: ERROR 22001 Microsoft ODBC SQL Server Driver SQL Server STRING or data of BINARY was cut short.
ERROR 01000 Microsoft ODBC SQL Server Driver SQL Server statement was ended.

This is my code here for editing a record...

Protected Sub Button_save2_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_save2.Click
'||||| Create string connection
Dim StrConn As String = "Dsn=MS_PKG01;UID=emiline;APP=Microsoft? Visual Studio? 2005;WSID=MSHNP200603;DATABASE=MS_PKG01;Trusted_Connection=Yes"
'||||| Create connection object
Dim MyConn As Odbc.OdbcConnection = New Odbc.OdbcConnection(StrConn)

'||||| Open connection
MyConn.Open()

'|||| Create odbcCommand object
Dim Update_record As New Odbc.OdbcCommand("UPDATE TM0001 SET TM0001.syain_name = ?, TM0001.syain_pass = ?, TM0001.office_id = ?, TM0001.birth_date = ?, TM0001.empl_date = ?, TM0001.user_iden = ? ", MyConn)

Dim hireYear As String
Dim hireMonth As String
Dim hireDay As String
Dim date_hire As String

hireYear = DropDownList_hire_yr.Text
hireMonth = DropDownList_hire_mo.Text
hireDay = DropDownList_hire_day.Text

date_hire = hireYear + "/" + hireMonth + "/" + hireDay

'|||| Add command parameters
Update_record.Parameters.Add("@.P1", OdbcType.Char, 8).Value = TextBox_id.Text
Update_record.Parameters.Add("@.P2", OdbcType.Char, 20).Value = TextBox_name.Text
Update_record.Parameters.Add("@.P3", OdbcType.Char, 20).Value = TextBox_pswd.Text
Update_record.Parameters.Add("@.P3", OdbcType.Char, 40).Value = DropDownList_office.SelectedValue
Update_record.Parameters.Add("@.P3", OdbcType.Char, 2).Value = date_hire
Update_record.Parameters.Add("@.P3", OdbcType.Char, 10).Value = TextBox_bday.Text
Update_record.Parameters.Add("@.P3", OdbcType.Char, 1).Value = DropDownList_iden.SelectedValue

'|||| Execute command
Update_record.ExecuteNonQuery()

'|||| Close connection
MyConn.Close()
End Sub
End Class

I modify some codes already but still same error...

my code:

'||||| Create connection object
Dim MyConn As Odbc.OdbcConnection = New Odbc.OdbcConnection(StrConn)

'|||| Create odbcCommand object
Dim Update_record As New Odbc.OdbcCommand("UPDATE TM0001 SET TM0001.syain_name = ?, TM0001.syain_pass = ?, TM0001.office_id = ?, TM0001.birth_date = ?, TM0001.empl_date = ?, TM0001.user_iden = ? where syain_id = ? ", MyConn)

id_user = TextBox_id.Text
name = TextBox_name.Text
pass = TextBox_pswd.Text
office_id = DropDownList_office.SelectedValue
bday = TextBox_bday.Text
iden = DropDownList_iden.SelectedValue

hireYear = DropDownList_hire_yr.Text
hireMonth = DropDownList_hire_mo.Text
hireDay = DropDownList_hire_day.Text

date_hire = hireYear + "/" + hireMonth + "/" + hireDay

'|||| Add command parameters

Update_record.Parameters.Add("@.P1", OdbcType.Char).Value = name
Update_record.Parameters.Add("@.P1", OdbcType.Char).Value = pass
Update_record.Parameters.Add("@.P1", OdbcType.Char).Value = office_id
Update_record.Parameters.Add("@.P1", OdbcType.Char).Value = date_hire
Update_record.Parameters.Add("@.P1", OdbcType.Char).Value = bday
Update_record.Parameters.Add("@.P1", OdbcType.Char).Value = iden
Update_record.Parameters.Add("@.P1", OdbcType.Char).Value = id_user


'||||| Open connection
MyConn.Open()

'|||| Execute command
Update_record.ExecuteNonQuery()

'|||| Close connection
MyConn.Close()

|||

Hi,

i think a textfield has more data as permitted, so the update command crashed. You can inspect the prepared SQLCommand inside the Update_record object and try to execute this command direct in the database (Query Analyzer or Database Command Prompt Interface).

Regards
Marc Andre

|||

hmmm i already check it and there is nothing wrong...

and whenever i input a new record it always satisfy the condition in the data type...

but still i dont why when i edit it generates error in my code...

hmmm another thing that i observe in my code is that when

i click the save button when editing it doesnt change anything...but the first record or the initial record always shows...

i tried putting is postback but nothing happens...

everytime i press the save button to saved my changes in the data the initial entry shows...

coz in my pageload the initial entry or the first record in the dabse is shown...

hmmm what do u think?

Problems importing data from an ODBC source

I'm having an odd issue importing data from an ODBC source using a DataReader Source.

There's data in the source table, and if I use a non-SSIS tool to query the source, all the data is visible. However, if I use the SSIS DataReader source, It returns no rows, and throws no error.

Any ideas for figuring this one out? This is affecting about 10% of the tables from this data source, and it's our ERP application, so there's limits on what I can do to the source schemas.

Thanks!

What types of colums are contained in these tables?

Monday, March 26, 2012

Problems executing DML via linked server

Hey folks..
I have a linked server that connects to a DB2 database through the OLE DB
for ODBC Providers driver. I have a DSN created and can, through the linked
server run SELECT statements to my heart's content. When I want to run a
simple DELETE, for example (DELETE HCEDB.APPLQUE2), I get the following
error.
Server: Msg 7345, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' could not delete from table '"HCEDB"."APPLQUE2"'.
User did not have sufficient permission to delete the row.
[OLE/DB provider returned message: Multiple-step OLE DB operation generated
errors. Check each OLE DB status value, if available. No work was done.]
[OLE/DB provider returned message: [IBM][CLI Driver] CLI0150E Driver not
capable. SQLSTATE=S1C00]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::DeleteRows
returned 0x80040e21: DBROWSTATUS_E_PERMISSIONDENIED].
I have gone to a colleague's machine to use a DB2 Client and authenticated
using the same user specified in both the DSN and Linked Server and was able
to execute the DELETE. Any ideas as to cause and resolution?
Thanks..
Peace,
Gary HampsonIf you are using a DELETE FROM (Table Name), beware.
I was doing the same thing on a DB2 Database with some test data given to me
, and I would get the same error when I tried to delete using the Linked Ser
ver, where if I tried to do it straight in the DB2 Console, I could execute
without any problems.
So I ran an Event Monitor. Happens out, the Microsoft OLE DB Provider for OD
BC Drivers turns it into count(*) many "DELETE FROM TABLE WHERE field = ?".
So if your table has 1000 rows, you'll have 1000 Delete Statements run in se
quence. Very inefficent, but it gets the job done. The reason for my error w
as that there were 3 rows that were identical to each other, and so it had 3
identical "DELETE FROM" statements.
My solution: Deleted the replicated rows. It apparantly was an oversight whe
n creating the test data.
I still have an issue with it producing all those Delete Statements though.
I'm currently looking into other ways of doing it.

Problems due to @@IDENTITY

I have a database that sits on SQL Server 2000 and the client is Access XP
connecting to SQL via ODBC.
The database has been in use since November 2003 and all has been working
well. However......over the past w a strange thing has been happening
that, when new customer details were entered and the record was saved, the
displayed record would change to that of another although the new record had
been saved to the table.
At first I thought it was Access playing around (bless it) but have since
discovered the true cause. Whenever a new customer is entered, a SQL
trigger fires that will also create a dummy record in another table
(tbl_MainCaseEntry) ready for the user to enter details. There is an
essential reason for the trigger but it is too long winded to explain why.
The trigger reads:
CREATE TRIGGER trg_NewCustomer
ON tbl_Customer
FOR INSERT
AS
BEGIN
DECLARE @.CustID INT, @.CaseCount INT
SET @.CustID = (SELECT CustomerID FROM Inserted)
INSERT INTO tbl_MainCaseEntry (CustomerID) VALUES(@.CustID)
END
The field CustomerID in tbl_MainCaseEntry is the foreign key with the table
having it's own primary key of MainID (set as an identity field seeded
(1,1)).
I have since discovered via the Query Analyser that @.@.IDENTITY is pulling
back the last identity field for the entire statement (in this case the
MainID in tbl_MainCaseEntry for the new record created by the trigger).
Is there any way that I can stop this from happening by using
IDENT_CURRENT('tbl_Customer') and making sure that @.@.IDENTITY is forced back
to this value? I have tried to use SET @.@.IDENTITY =
IDENT_CURRENT('tbl_Customer') but this does not work.
Any advice would be appreciated as this is driving me mad!!
Regards
DazzaUse SCOPE_IDENTITY, not @.@.IDENTITY. This side effect is well documented.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"Dazza" <Post2Group@.Only.com> wrote in message
news:#3683HKMFHA.1096@.tk2msftngp13.phx.gbl...
> I have a database that sits on SQL Server 2000 and the client is Access XP
> connecting to SQL via ODBC.
> The database has been in use since November 2003 and all has been working
> well. However......over the past w a strange thing has been
happening
> that, when new customer details were entered and the record was saved, the
> displayed record would change to that of another although the new record
had
> been saved to the table.
> At first I thought it was Access playing around (bless it) but have since
> discovered the true cause. Whenever a new customer is entered, a SQL
> trigger fires that will also create a dummy record in another table
> (tbl_MainCaseEntry) ready for the user to enter details. There is an
> essential reason for the trigger but it is too long winded to explain why.
> The trigger reads:
> CREATE TRIGGER trg_NewCustomer
> ON tbl_Customer
> FOR INSERT
> AS
> BEGIN
> DECLARE @.CustID INT, @.CaseCount INT
> SET @.CustID = (SELECT CustomerID FROM Inserted)
> INSERT INTO tbl_MainCaseEntry (CustomerID) VALUES(@.CustID)
> END
> The field CustomerID in tbl_MainCaseEntry is the foreign key with the
table
> having it's own primary key of MainID (set as an identity field seeded
> (1,1)).
> I have since discovered via the Query Analyser that @.@.IDENTITY is pulling
> back the last identity field for the entire statement (in this case the
> MainID in tbl_MainCaseEntry for the new record created by the trigger).
> Is there any way that I can stop this from happening by using
> IDENT_CURRENT('tbl_Customer') and making sure that @.@.IDENTITY is forced
back
> to this value? I have tried to use SET @.@.IDENTITY =
> IDENT_CURRENT('tbl_Customer') but this does not work.
> Any advice would be appreciated as this is driving me mad!!
> Regards
> Dazza
>|||Have you tried using SCOPE_IDENTITY already?
Look it up in BOL to learn more.
-Jason
"Dazza" <Post2Group@.Only.com> wrote in message
news:#3683HKMFHA.1096@.tk2msftngp13.phx.gbl...
> I have a database that sits on SQL Server 2000 and the client is Access XP
> connecting to SQL via ODBC.
> The database has been in use since November 2003 and all has been working
> well. However......over the past w a strange thing has been
happening
> that, when new customer details were entered and the record was saved, the
> displayed record would change to that of another although the new record
had
> been saved to the table.
> At first I thought it was Access playing around (bless it) but have since
> discovered the true cause. Whenever a new customer is entered, a SQL
> trigger fires that will also create a dummy record in another table
> (tbl_MainCaseEntry) ready for the user to enter details. There is an
> essential reason for the trigger but it is too long winded to explain why.
> The trigger reads:
> CREATE TRIGGER trg_NewCustomer
> ON tbl_Customer
> FOR INSERT
> AS
> BEGIN
> DECLARE @.CustID INT, @.CaseCount INT
> SET @.CustID = (SELECT CustomerID FROM Inserted)
> INSERT INTO tbl_MainCaseEntry (CustomerID) VALUES(@.CustID)
> END
> The field CustomerID in tbl_MainCaseEntry is the foreign key with the
table
> having it's own primary key of MainID (set as an identity field seeded
> (1,1)).
> I have since discovered via the Query Analyser that @.@.IDENTITY is pulling
> back the last identity field for the entire statement (in this case the
> MainID in tbl_MainCaseEntry for the new record created by the trigger).
> Is there any way that I can stop this from happening by using
> IDENT_CURRENT('tbl_Customer') and making sure that @.@.IDENTITY is forced
back
> to this value? I have tried to use SET @.@.IDENTITY =
> IDENT_CURRENT('tbl_Customer') but this does not work.
> Any advice would be appreciated as this is driving me mad!!
> Regards
> Dazza
>|||look up scope_identity in BOL
"Dazza" <Post2Group@.Only.com> wrote in message
news:%233683HKMFHA.1096@.tk2msftngp13.phx.gbl...
>I have a database that sits on SQL Server 2000 and the client is Access XP
>connecting to SQL via ODBC.
> The database has been in use since November 2003 and all has been working
> well. However......over the past w a strange thing has been
> happening that, when new customer details were entered and the record was
> saved, the displayed record would change to that of another although the
> new record had been saved to the table.
> At first I thought it was Access playing around (bless it) but have since
> discovered the true cause. Whenever a new customer is entered, a SQL
> trigger fires that will also create a dummy record in another table
> (tbl_MainCaseEntry) ready for the user to enter details. There is an
> essential reason for the trigger but it is too long winded to explain why.
> The trigger reads:
> CREATE TRIGGER trg_NewCustomer
> ON tbl_Customer
> FOR INSERT
> AS
> BEGIN
> DECLARE @.CustID INT, @.CaseCount INT
> SET @.CustID = (SELECT CustomerID FROM Inserted)
> INSERT INTO tbl_MainCaseEntry (CustomerID) VALUES(@.CustID)
> END
> The field CustomerID in tbl_MainCaseEntry is the foreign key with the
> table having it's own primary key of MainID (set as an identity field
> seeded (1,1)).
> I have since discovered via the Query Analyser that @.@.IDENTITY is pulling
> back the last identity field for the entire statement (in this case the
> MainID in tbl_MainCaseEntry for the new record created by the trigger).
> Is there any way that I can stop this from happening by using
> IDENT_CURRENT('tbl_Customer') and making sure that @.@.IDENTITY is forced
> back to this value? I have tried to use SET @.@.IDENTITY =
> IDENT_CURRENT('tbl_Customer') but this does not work.
> Any advice would be appreciated as this is driving me mad!!
> Regards
> Dazza
>|||I have looked in the BOL regards this feature but cannot understand it's
exact use. Where abouts in my trigger do I use SCOPE_IDENTITY() and what is
the syntax please?
All BOL seems to show is that it will display the identity of the table
where the focus starts (ie tbl_Customer) by using SELECT SCOPE_IDENTITY() AS
[SCOPE_IDENTITY].
Regards
Dazza
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:uoXHLKKMFHA.1176@.TK2MSFTNGP15.phx.gbl...
> Use SCOPE_IDENTITY, not @.@.IDENTITY. This side effect is well documented.
> --
> Please post DDL, sample data and desired results.
> See http://www.aspfaq.com/5006 for info.
>
>
> "Dazza" <Post2Group@.Only.com> wrote in message
> news:#3683HKMFHA.1096@.tk2msftngp13.phx.gbl...
> happening
> had
> table
> back
>|||@.@.IDENTITY is fine to use within the trigger.
But if you want the calling code to return the identity value generated by
its INSERT statement (not the INSERT in the trigger), use SCOPE_IDENTITY()
in the calling code. http://www.aspfaq.com/2174
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"Dazza" <Post2Group@.Only.com> wrote in message
news:#kky3OKMFHA.2384@.tk2msftngp13.phx.gbl...
> I have looked in the BOL regards this feature but cannot understand it's
> exact use. Where abouts in my trigger do I use SCOPE_IDENTITY() and what
is
> the syntax please?
> All BOL seems to show is that it will display the identity of the table
> where the focus starts (ie tbl_Customer) by using SELECT SCOPE_IDENTITY()
AS
> [SCOPE_IDENTITY].
> Regards
> Dazza
> "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> news:uoXHLKKMFHA.1176@.TK2MSFTNGP15.phx.gbl...
documented.
working
record
since
pulling
>|||I also note another problem here.
I guess you assume that inserts always happen in singleton? You need this
code to be multi-row aware. For example, watch what happens when you do
this:
INSERT Customers(col1, ..., colN)
SELECT 'col1', ..., colN
UNION
SELECT 'col1', ..., colN
To correct this, your INSERT statement inside the trigger should simply be:
INSERT tbl_MainCaseEntry (CustomerID)
SELECT CustomerID FROM Inserted
Or, change the calling stored procedure to handle the logging part of this,
and eliminate the need for a trigger at all. You do control access to this
table via stored procedures, right?
In any case, the calling app can't expect to get back a single @.@.IDENTITY or
SCOPE_IDENTITY() in the multi-row insert case.
(I also think you should consider dropping the superfluous tbl_ prefix, but
that's just an opinion.)
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.|||Aaron
Many thanks for the advice.
I do not use SPs for the entry or retrieval of the data in forms as the
front-end uses linked tables. I have been working with SQL Server for about
a year (mostly admin) and still have a lot to learn regards development
methods for front-end access clients. The database in question is my first
real production development project but there are more to come I have been
told !!
Regards
Dazza
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23PMTcUKMFHA.2420@.TK2MSFTNGP12.phx.gbl...
>I also note another problem here.
>
> I guess you assume that inserts always happen in singleton? You need this
> code to be multi-row aware. For example, watch what happens when you do
> this:
> INSERT Customers(col1, ..., colN)
> SELECT 'col1', ..., colN
> UNION
> SELECT 'col1', ..., colN
> To correct this, your INSERT statement inside the trigger should simply
> be:
> INSERT tbl_MainCaseEntry (CustomerID)
> SELECT CustomerID FROM Inserted
> Or, change the calling stored procedure to handle the logging part of
> this,
> and eliminate the need for a trigger at all. You do control access to
> this
> table via stored procedures, right?
> In any case, the calling app can't expect to get back a single @.@.IDENTITY
> or
> SCOPE_IDENTITY() in the multi-row insert case.
> (I also think you should consider dropping the superfluous tbl_ prefix,
> but
> that's just an opinion.)
> --
> Please post DDL, sample data and desired results.
> See http://www.aspfaq.com/5006 for info.
>

Wednesday, March 21, 2012

Problems connecting from reporting services to Oracle using odbc connection and asp.net 2.0

Hi,

Anybody have a clear idea why I might have problems connecting from reporting services to Oracle 9i database using the Microsoft ODBC driver? Getting following error

"Cannot create a connection to data source 'oracleName'.

  • ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
  • "

    I have the data source correctly set-up thought. Is it a permissions problem?

    Thanks.

    When you say you have it set up correctly, do you mean that you were able to connect to it from other applications? or what exactly?

    Assuming it is correct, try using the Microsoft OLE DB Provider for ODBC. This always works for me.

    >L<

  • Monday, March 12, 2012

    problems

    Microsoft OLE DB Provider for ODBC Drivers
    error '80004005'
    Specified driver could not be loaded due to system error
    126 (SQL Server).Problem with the MDAC installation of the Driver or dependent component.
    Stop all applications that use SQL Server and ODBC. Try re-installing the
    latest MDAC stack for your client.
    Install the MDAC security patch:
    http://www.microsoft.com/technet/tr...chnet/security/
    Bulletin/MS04-003.asp
    Thanks,
    Kevin McDonnell
    Microsoft Corporation
    This posting is provided AS IS with no warranties, and confers no rights.|||In the article on this link you will find a lot of info how to troubleshoot
    this error: http://support.microsoft.com/defaul...b;EN-US;306518.
    Dejan Sarka, SQL Server MVP
    Associate Mentor
    Solid Quality Learning
    More than just Training
    www.SolidQualityLearning.com
    "pedro" <anonymous@.discussions.microsoft.com> wrote in message
    news:041e01c3dede$90fd4810$a301280a@.phx.gbl...
    quote:

    > Microsoft OLE DB Provider for ODBC Drivers
    > error '80004005'
    > Specified driver could not be loaded due to system error
    > 126 (SQL Server).
    >

    problemas con el SQL 7.0

    Microsoft OLE DB Provider for ODBC Drivers
    error '80004005'
    Specified driver could not be loaded due to system error
    126 (SQL Server).
    alguien puede darme alguna posible solucionTry running Dependency Walker with any ODBC application. There is a
    profiling option that will help you identify the problem component.
    www.dependencywalker.com
    Thanks,
    Kevin McDonnell
    Microsoft Corporation
    This posting is provided AS IS with no warranties, and confers no rights.

    Problem: SSIS, ODBC and Progress Database

    Hi,

    The project I′m working needs to import data from a Progress Database. I had configured my ODBC (MERANT 3.60 32-BIT Progress SQL92 v9.1D) driver and everything seems to be ok.

    But when I tried to create a DataRearder Source pointing to my ODBC Data Source, and open the next tab I received this error message:

    “Error at Data Flow Task [DataReader Soucer [135]]: Cannot acquire a managed connection from the run-time connection manager”

    Anyone can help ?

    DataReaderSource requires a managed ADO.Net connection, so try to create a ADO.Net:ODBC connection first then point to that connection at DataReaderSrc.

    Thanks

    Wenyang

    |||

    Wenyang,

    Since the first time I did what you said. I create a ADO.NET:ODBC connection and I received a successifull message.

    But when I create create a DataReader Source and point to my ADO.NET:ODBC connection I receive this message:

    “Error at Data Flow Task [DataReader Soucer [135]]: Cannot acquire a managed connection from the run-time connection manager”

    Appreciate your attencion.

    [ ]′s

    |||

    um...normally this error is only seen when you use a wrong type of connection manager(e.g. a native one) at DataReaderSrc.

    If you did use .Net provider for ODBC in your connection manager, did you see success when pushing the button "Test Connection" in your connection manager? We cast the connection to IDbConnection, I see no reason why you succeeded there but failed in DataReaderSrc on this error...

    Thanks

    Wenyang

    |||

    were you able to slove this problem..

    I am also facing similar problems.

    |||

    Even i am facing similar kind of problem. But i my case i trying to connect to JDE through ODBC driver.

    When i test the connection in connection manager, it succeds. but when i try to pull data using DataSource reader, it gives the same error,

    "Error at DAta Flow Tast[DataReader Source [1]]: Cannot acquire a managed connection from the run-time connection manager."

    Can any body help me ?

    Regards,

    Chetan

    |||

    I had a similar issue, the error I was getting:

    "Error at Data Flow Tast[DataReader Source [35]]: Cannot acquire a managed connection from the run-time connection manager."

    I changed to the ADO.NET ODBC as suggested above and it worked for me, THANKS for the tip!

    Before changing it to ADO.NET ODBC it would work in the connection manager for the test but not the data read task. You would think Microsoft would either give better error messages or not allow the connection to be selected or something instead of just giving generic messages.

    |||

    I had a similar issue, the error I was getting:

    "Error at Data Flow Tast[DataReader Source [35]]: Cannot acquire a managed connection from the run-time connection manager."

    I changed to the ADO.NET ODBC as suggested above and it worked for me, THANKS for the tip!

    Before changing it to ADO.NET ODBC it would work in the connection manager for the test but not the data read task. You would think Microsoft would either give better error messages or not allow the connection to be selected or something instead of just giving generic messages.

    |||

    Hi, I am facing problem to connect to progress db in .net,

    Would you please let me know of the connection string and other settings ,

    I currently get connection string wrong format problem , but the weird part is when i test connection, it passes.

    but then i get error when i try set anything else.

    Thanking you.

    |||

    Problem solved

    |||

    Hi,

    Could you please share your experience with us?

    Thanks

    Problem: SSIS, ODBC and Progress Database

    Hi,

    The project I′m working needs to import data from a Progress Database. I had configured my ODBC (MERANT 3.60 32-BIT Progress SQL92 v9.1D) driver and everything seems to be ok.

    But when I tried to create a DataRearder Source pointing to my ODBC Data Source, and open the next tab I received this error message:

    “Error at Data Flow Task [DataReader Soucer [135]]: Cannot acquire a managed connection from the run-time connection manager”

    Anyone can help ?

    DataReaderSource requires a managed ADO.Net connection, so try to create a ADO.Net:ODBC connection first then point to that connection at DataReaderSrc.

    Thanks

    Wenyang

    |||

    Wenyang,

    Since the first time I did what you said. I create a ADO.NET:ODBC connection and I received a successifull message.

    But when I create create a DataReader Source and point to my ADO.NET:ODBC connection I receive this message:

    “Error at Data Flow Task [DataReader Soucer [135]]: Cannot acquire a managed connection from the run-time connection manager”

    Appreciate your attencion.

    [ ]′s

    |||

    um...normally this error is only seen when you use a wrong type of connection manager(e.g. a native one) at DataReaderSrc.

    If you did use .Net provider for ODBC in your connection manager, did you see success when pushing the button "Test Connection" in your connection manager? We cast the connection to IDbConnection, I see no reason why you succeeded there but failed in DataReaderSrc on this error...

    Thanks

    Wenyang

    |||

    were you able to slove this problem..

    I am also facing similar problems.

    |||

    Even i am facing similar kind of problem. But i my case i trying to connect to JDE through ODBC driver.

    When i test the connection in connection manager, it succeds. but when i try to pull data using DataSource reader, it gives the same error,

    "Error at DAta Flow Tast[DataReader Source [1]]: Cannot acquire a managed connection from the run-time connection manager."

    Can any body help me ?

    Regards,

    Chetan

    |||

    I had a similar issue, the error I was getting:

    "Error at Data Flow Tast[DataReader Source [35]]: Cannot acquire a managed connection from the run-time connection manager."

    I changed to the ADO.NET ODBC as suggested above and it worked for me, THANKS for the tip!

    Before changing it to ADO.NET ODBC it would work in the connection manager for the test but not the data read task. You would think Microsoft would either give better error messages or not allow the connection to be selected or something instead of just giving generic messages.

    |||

    I had a similar issue, the error I was getting:

    "Error at Data Flow Tast[DataReader Source [35]]: Cannot acquire a managed connection from the run-time connection manager."

    I changed to the ADO.NET ODBC as suggested above and it worked for me, THANKS for the tip!

    Before changing it to ADO.NET ODBC it would work in the connection manager for the test but not the data read task. You would think Microsoft would either give better error messages or not allow the connection to be selected or something instead of just giving generic messages.

    |||

    Hi, I am facing problem to connect to progress db in .net,

    Would you please let me know of the connection string and other settings ,

    I currently get connection string wrong format problem , but the weird part is when i test connection, it passes.

    but then i get error when i try set anything else.

    Thanking you.

    |||

    Problem solved

    |||

    Hi,

    Could you please share your experience with us?

    Thanks

    Problem: SSIS, ODBC and Progress Database

    Hi,

    The project I′m working needs to import data from a Progress Database. I had configured my ODBC (MERANT 3.60 32-BIT Progress SQL92 v9.1D) driver and everything seems to be ok.

    But when I tried to create a DataRearder Source pointing to my ODBC Data Source, and open the next tab I received this error message:

    “Error at Data Flow Task [DataReader Soucer [135]]: Cannot acquire a managed connection from the run-time connection manager”

    Anyone can help ?

    DataReaderSource requires a managed ADO.Net connection, so try to create a ADO.Net:ODBC connection first then point to that connection at DataReaderSrc.

    Thanks

    Wenyang

    |||

    Wenyang,

    Since the first time I did what you said. I create a ADO.NET:ODBC connection and I received a successifull message.

    But when I create create a DataReader Source and point to my ADO.NET:ODBC connection I receive this message:

    “Error at Data Flow Task [DataReader Soucer [135]]: Cannot acquire a managed connection from the run-time connection manager”

    Appreciate your attencion.

    [ ]′s

    |||

    um...normally this error is only seen when you use a wrong type of connection manager(e.g. a native one) at DataReaderSrc.

    If you did use .Net provider for ODBC in your connection manager, did you see success when pushing the button "Test Connection" in your connection manager? We cast the connection to IDbConnection, I see no reason why you succeeded there but failed in DataReaderSrc on this error...

    Thanks

    Wenyang

    |||

    were you able to slove this problem..

    I am also facing similar problems.

    |||

    Even i am facing similar kind of problem. But i my case i trying to connect to JDE through ODBC driver.

    When i test the connection in connection manager, it succeds. but when i try to pull data using DataSource reader, it gives the same error,

    "Error at DAta Flow Tast[DataReader Source [1]]: Cannot acquire a managed connection from the run-time connection manager."

    Can any body help me ?

    Regards,

    Chetan

    |||

    I had a similar issue, the error I was getting:

    "Error at Data Flow Tast[DataReader Source [35]]: Cannot acquire a managed connection from the run-time connection manager."

    I changed to the ADO.NET ODBC as suggested above and it worked for me, THANKS for the tip!

    Before changing it to ADO.NET ODBC it would work in the connection manager for the test but not the data read task. You would think Microsoft would either give better error messages or not allow the connection to be selected or something instead of just giving generic messages.

    |||

    I had a similar issue, the error I was getting:

    "Error at Data Flow Tast[DataReader Source [35]]: Cannot acquire a managed connection from the run-time connection manager."

    I changed to the ADO.NET ODBC as suggested above and it worked for me, THANKS for the tip!

    Before changing it to ADO.NET ODBC it would work in the connection manager for the test but not the data read task. You would think Microsoft would either give better error messages or not allow the connection to be selected or something instead of just giving generic messages.

    |||

    Hi, I am facing problem to connect to progress db in .net,

    Would you please let me know of the connection string and other settings ,

    I currently get connection string wrong format problem , but the weird part is when i test connection, it passes.

    but then i get error when i try set anything else.

    Thanking you.

    |||

    Problem solved

    |||

    Hi,

    Could you please share your experience with us?

    Thanks

    Problem: SSIS, ODBC and Progress Database

    Hi,

    The project I′m working needs to import data from a Progress Database. I had configured my ODBC (MERANT 3.60 32-BIT Progress SQL92 v9.1D) driver and everything seems to be ok.

    But when I tried to create a DataRearder Source pointing to my ODBC Data Source, and open the next tab I received this error message:

    “Error at Data Flow Task [DataReader Soucer [135]]: Cannot acquire a managed connection from the run-time connection manager”

    Anyone can help ?

    DataReaderSource requires a managed ADO.Net connection, so try to create a ADO.Net:ODBC connection first then point to that connection at DataReaderSrc.

    Thanks

    Wenyang

    |||

    Wenyang,

    Since the first time I did what you said. I create a ADO.NET:ODBC connection and I received a successifull message.

    But when I create create a DataReader Source and point to my ADO.NET:ODBC connection I receive this message:

    “Error at Data Flow Task [DataReader Soucer [135]]: Cannot acquire a managed connection from the run-time connection manager”

    Appreciate your attencion.

    [ ]′s

    |||

    um...normally this error is only seen when you use a wrong type of connection manager(e.g. a native one) at DataReaderSrc.

    If you did use .Net provider for ODBC in your connection manager, did you see success when pushing the button "Test Connection" in your connection manager? We cast the connection to IDbConnection, I see no reason why you succeeded there but failed in DataReaderSrc on this error...

    Thanks

    Wenyang

    |||

    were you able to slove this problem..

    I am also facing similar problems.

    |||

    Even i am facing similar kind of problem. But i my case i trying to connect to JDE through ODBC driver.

    When i test the connection in connection manager, it succeds. but when i try to pull data using DataSource reader, it gives the same error,

    "Error at DAta Flow Tast[DataReader Source [1]]: Cannot acquire a managed connection from the run-time connection manager."

    Can any body help me ?

    Regards,

    Chetan

    |||

    I had a similar issue, the error I was getting:

    "Error at Data Flow Tast[DataReader Source [35]]: Cannot acquire a managed connection from the run-time connection manager."

    I changed to the ADO.NET ODBC as suggested above and it worked for me, THANKS for the tip!

    Before changing it to ADO.NET ODBC it would work in the connection manager for the test but not the data read task. You would think Microsoft would either give better error messages or not allow the connection to be selected or something instead of just giving generic messages.

    |||

    I had a similar issue, the error I was getting:

    "Error at Data Flow Tast[DataReader Source [35]]: Cannot acquire a managed connection from the run-time connection manager."

    I changed to the ADO.NET ODBC as suggested above and it worked for me, THANKS for the tip!

    Before changing it to ADO.NET ODBC it would work in the connection manager for the test but not the data read task. You would think Microsoft would either give better error messages or not allow the connection to be selected or something instead of just giving generic messages.

    |||

    Hi, I am facing problem to connect to progress db in .net,

    Would you please let me know of the connection string and other settings ,

    I currently get connection string wrong format problem , but the weird part is when i test connection, it passes.

    but then i get error when i try set anything else.

    Thanking you.

    |||

    Problem solved

    |||

    Hi,

    Could you please share your experience with us?

    Thanks

    Problem: SSIS, ODBC and Progress Database

    Hi,

    The project I′m working needs to import data from a Progress Database. I had configured my ODBC (MERANT 3.60 32-BIT Progress SQL92 v9.1D) driver and everything seems to be ok.

    But when I tried to create a DataRearder Source pointing to my ODBC Data Source, and open the next tab I received this error message:

    “Error at Data Flow Task [DataReader Soucer [135]]: Cannot acquire a managed connection from the run-time connection manager”

    Anyone can help ?

    DataReaderSource requires a managed ADO.Net connection, so try to create a ADO.Net:ODBC connection first then point to that connection at DataReaderSrc.

    Thanks

    Wenyang

    |||

    Wenyang,

    Since the first time I did what you said. I create a ADO.NET:ODBC connection and I received a successifull message.

    But when I create create a DataReader Source and point to my ADO.NET:ODBC connection I receive this message:

    “Error at Data Flow Task [DataReader Soucer [135]]: Cannot acquire a managed connection from the run-time connection manager”

    Appreciate your attencion.

    [ ]′s

    |||

    um...normally this error is only seen when you use a wrong type of connection manager(e.g. a native one) at DataReaderSrc.

    If you did use .Net provider for ODBC in your connection manager, did you see success when pushing the button "Test Connection" in your connection manager? We cast the connection to IDbConnection, I see no reason why you succeeded there but failed in DataReaderSrc on this error...

    Thanks

    Wenyang

    |||

    were you able to slove this problem..

    I am also facing similar problems.

    |||

    Even i am facing similar kind of problem. But i my case i trying to connect to JDE through ODBC driver.

    When i test the connection in connection manager, it succeds. but when i try to pull data using DataSource reader, it gives the same error,

    "Error at DAta Flow Tast[DataReader Source [1]]: Cannot acquire a managed connection from the run-time connection manager."

    Can any body help me ?

    Regards,

    Chetan

    |||

    I had a similar issue, the error I was getting:

    "Error at Data Flow Tast[DataReader Source [35]]: Cannot acquire a managed connection from the run-time connection manager."

    I changed to the ADO.NET ODBC as suggested above and it worked for me, THANKS for the tip!

    Before changing it to ADO.NET ODBC it would work in the connection manager for the test but not the data read task. You would think Microsoft would either give better error messages or not allow the connection to be selected or something instead of just giving generic messages.

    |||

    I had a similar issue, the error I was getting:

    "Error at Data Flow Tast[DataReader Source [35]]: Cannot acquire a managed connection from the run-time connection manager."

    I changed to the ADO.NET ODBC as suggested above and it worked for me, THANKS for the tip!

    Before changing it to ADO.NET ODBC it would work in the connection manager for the test but not the data read task. You would think Microsoft would either give better error messages or not allow the connection to be selected or something instead of just giving generic messages.

    |||

    Hi, I am facing problem to connect to progress db in .net,

    Would you please let me know of the connection string and other settings ,

    I currently get connection string wrong format problem , but the weird part is when i test connection, it passes.

    but then i get error when i try set anything else.

    Thanking you.

    |||

    Problem solved

    |||

    Hi,

    Could you please share your experience with us?

    Thanks

    Problem: SSIS, ODBC and Progress Database

    Hi,

    The project I′m working needs to import data from a Progress Database. I had configured my ODBC (MERANT 3.60 32-BIT Progress SQL92 v9.1D) driver and everything seems to be ok.

    But when I tried to create a DataRearder Source pointing to my ODBC Data Source, and open the next tab I received this error message:

    “Error at Data Flow Task [DataReader Soucer [135]]: Cannot acquire a managed connection from the run-time connection manager”

    Anyone can help ?

    DataReaderSource requires a managed ADO.Net connection, so try to create a ADO.Net:ODBC connection first then point to that connection at DataReaderSrc.

    Thanks

    Wenyang

    |||

    Wenyang,

    Since the first time I did what you said. I create a ADO.NET:ODBC connection and I received a successifull message.

    But when I create create a DataReader Source and point to my ADO.NET:ODBC connection I receive this message:

    “Error at Data Flow Task [DataReader Soucer [135]]: Cannot acquire a managed connection from the run-time connection manager”

    Appreciate your attencion.

    [ ]′s

    |||

    um...normally this error is only seen when you use a wrong type of connection manager(e.g. a native one) at DataReaderSrc.

    If you did use .Net provider for ODBC in your connection manager, did you see success when pushing the button "Test Connection" in your connection manager? We cast the connection to IDbConnection, I see no reason why you succeeded there but failed in DataReaderSrc on this error...

    Thanks

    Wenyang

    |||

    were you able to slove this problem..

    I am also facing similar problems.

    |||

    Even i am facing similar kind of problem. But i my case i trying to connect to JDE through ODBC driver.

    When i test the connection in connection manager, it succeds. but when i try to pull data using DataSource reader, it gives the same error,

    "Error at DAta Flow Tast[DataReader Source [1]]: Cannot acquire a managed connection from the run-time connection manager."

    Can any body help me ?

    Regards,

    Chetan

    |||

    I had a similar issue, the error I was getting:

    "Error at Data Flow Tast[DataReader Source [35]]: Cannot acquire a managed connection from the run-time connection manager."

    I changed to the ADO.NET ODBC as suggested above and it worked for me, THANKS for the tip!

    Before changing it to ADO.NET ODBC it would work in the connection manager for the test but not the data read task. You would think Microsoft would either give better error messages or not allow the connection to be selected or something instead of just giving generic messages.

    |||

    I had a similar issue, the error I was getting:

    "Error at Data Flow Tast[DataReader Source [35]]: Cannot acquire a managed connection from the run-time connection manager."

    I changed to the ADO.NET ODBC as suggested above and it worked for me, THANKS for the tip!

    Before changing it to ADO.NET ODBC it would work in the connection manager for the test but not the data read task. You would think Microsoft would either give better error messages or not allow the connection to be selected or something instead of just giving generic messages.

    |||

    Hi, I am facing problem to connect to progress db in .net,

    Would you please let me know of the connection string and other settings ,

    I currently get connection string wrong format problem , but the weird part is when i test connection, it passes.

    but then i get error when i try set anything else.

    Thanking you.

    |||

    Problem solved

    |||

    Hi,

    Could you please share your experience with us?

    Thanks

    Friday, March 9, 2012

    Problem: Parameter with available values from query

    =========================================

    dataSource: dsABC (ODBC)

    dataSet: dsetABC

    =========================================

    I have a parameterized report and one of parameter with available values from

    query.

    The query for the parameter is from another dataset (dsCompany) in order to allow

    users choosing the company values. In the Designer platform, it normally provide a

    drop-down list including expected company values. But when i upload to reporting

    server (http://xxxx/reports) and the following error messages will appear

    Reporting processing error (rsProcessingAborted)

    ...............Cannot connect to DataSource dsABC. (rsErrorOpeningConnection)

    ...........................................................................

    Besides, i can run the report normally if i remove the task of "available values from

    query".

    How can i solve this problem? Thank you for any opinion.

    Is dsCompany using a different datasource? If so, make sure that is deployed to your Report Server also.|||

    guyinkalamazoo3 wrote:

    Is dsCompany using a different datasource? If so, make sure that is deployed to your Report Server

    also.

    In fact, the dataset of dsetABC & dsCompany are also used a dataSource "dsABC",

    now just the "available values" task make error

    in the report. Why? (the report run normally if the "available values" task is removed in

    Report Server)

    |||

    Anyone can give me some suggestions. thank you!

    Problem: mssql locks several records in a specific table, while no one is editing them

    Hi,
    I have an Access application with linked tables via ODBC to MSSQL
    server 2000.

    Having a weird problem, probably something i've done while not being
    aware of (kinda newbie).

    the last 20 records (and growing)of a specific table are locked - cant
    change them - ("another user is editing these records ... ").

    I know for a fact that no one is editing records and yet no user can
    edit these last records in the MDB - including the administrator -
    while able to add new records.

    Administrator able to edit records in the ADP (mssql server) where the
    tables are stored.

    Please help, the application is renedred inert .

    Thanks for reading,
    Oren.Hi

    I can't say that I am an expert on access, but this sounds like the
    recordset may need refreshing i.e someone has changed the record and access
    knows the local copy is out of date.

    John

    "Oren" <orentini@.hotmail.com> wrote in message
    news:b1368c93.0409160909.128bae81@.posting.google.c om...
    > Hi,
    > I have an Access application with linked tables via ODBC to MSSQL
    > server 2000.
    > Having a weird problem, probably something i've done while not being
    > aware of (kinda newbie).
    > the last 20 records (and growing)of a specific table are locked - cant
    > change them - ("another user is editing these records ... ").
    > I know for a fact that no one is editing records and yet no user can
    > edit these last records in the MDB - including the administrator -
    > while able to add new records.
    > Administrator able to edit records in the ADP (mssql server) where the
    > tables are stored.
    > Please help, the application is renedred inert .
    > Thanks for reading,
    > Oren.|||Hi,
    thanks for replying.

    There is no local and remote copy of the table, the table is only
    stored in the sql server and linked to the access MDB.

    Simple refresh wont do (tried it, via the access menubars).

    have any more suggestions?

    Thanks,

    Oren,

    "John Bell" <jbellnewsposts@.hotmail.com> wrote in message news:<414b53f6$0$27296$afc38c87@.news.easynet.co.uk>...
    > Hi
    > I can't say that I am an expert on access, but this sounds like the
    > recordset may need refreshing i.e someone has changed the record and access
    > knows the local copy is out of date.
    > John
    > "Oren" <orentini@.hotmail.com> wrote in message
    > news:b1368c93.0409160909.128bae81@.posting.google.c om...
    > > Hi,
    > > I have an Access application with linked tables via ODBC to MSSQL
    > > server 2000.
    > > Having a weird problem, probably something i've done while not being
    > > aware of (kinda newbie).
    > > the last 20 records (and growing)of a specific table are locked - cant
    > > change them - ("another user is editing these records ... ").
    > > I know for a fact that no one is editing records and yet no user can
    > > edit these last records in the MDB - including the administrator -
    > > while able to add new records.
    > > Administrator able to edit records in the ADP (mssql server) where the
    > > tables are stored.
    > > Please help, the application is renedred inert .
    > > Thanks for reading,
    > > Oren.|||Hi

    You may want to post this is an access news group!

    John

    "Oren" <orentini@.hotmail.com> wrote in message
    news:b1368c93.0409180015.718465e6@.posting.google.c om...
    > Hi,
    > thanks for replying.
    > There is no local and remote copy of the table, the table is only
    > stored in the sql server and linked to the access MDB.
    > Simple refresh wont do (tried it, via the access menubars).
    > have any more suggestions?
    > Thanks,
    > Oren,
    >
    > "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
    news:<414b53f6$0$27296$afc38c87@.news.easynet.co.uk>...
    > > Hi
    > > I can't say that I am an expert on access, but this sounds like the
    > > recordset may need refreshing i.e someone has changed the record and
    access
    > > knows the local copy is out of date.
    > > John
    > > "Oren" <orentini@.hotmail.com> wrote in message
    > > news:b1368c93.0409160909.128bae81@.posting.google.c om...
    > > > Hi,
    > > > I have an Access application with linked tables via ODBC to MSSQL
    > > > server 2000.
    > > > > Having a weird problem, probably something i've done while not being
    > > > aware of (kinda newbie).
    > > > > the last 20 records (and growing)of a specific table are locked - cant
    > > > change them - ("another user is editing these records ... ").
    > > > > I know for a fact that no one is editing records and yet no user can
    > > > edit these last records in the MDB - including the administrator -
    > > > while able to add new records.
    > > > > Administrator able to edit records in the ADP (mssql server) where the
    > > > tables are stored.
    > > > > Please help, the application is renedred inert .
    > > > > Thanks for reading,
    > > > Oren.

    Wednesday, March 7, 2012

    problem with WIN2000 client

    One Winn 2000 workstatiom has problem with ACCESS 2003 ODBC conection to SQL
    server on WIN 2003 server. Other clients are all WINXP. This cient is on the
    different domain too. Some reports works, and some have error, ask for
    password again but not accept it even if it is supplied again. Application
    on other clients works well.Hi Zeljko,
    I noticed that the issue was posted in this newsgroup as a duplicated one.
    You have another post titled "problem with WIN2000 client" and I will add a
    reply to that post. If you have follow up questions, please post there and
    I will work with you. Thanks you very much.
    Sincerely yours,
    Michael Cheng
    Microsoft Online Support
    ****************************************
    *******************
    Get Secure! - www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.
    Please reply to newsgroups only, many thanks.

    problem with WIN2000 client

    One Winn 2000 workstatiom has problem with ACCESS 2003 ODBC conection to SQL
    server on WIN 2003 server. Other clients are all WINXP. This cient is on the
    different domain too. Some reports works, and some have error, ask for
    password again but not accept it even if it is supplied again. Application
    on other clients works well.
    Hi Zeljko,
    I noticed that the issue was posted in this newsgroup as a duplicated one.
    You have another post titled "problem with WIN2000 client" and I will add a
    reply to that post. If you have follow up questions, please post there and
    I will work with you. Thanks you very much.
    Sincerely yours,
    Michael Cheng
    Microsoft Online Support
    ************************************************** *********
    Get Secure! - www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.
    Please reply to newsgroups only, many thanks.

    Saturday, February 25, 2012

    Problem with way to access all recordsets returned by sp_spaceused using ODBC APIs on C++

    Hi all,
    I have a problem executing a sp_spaceused on a database.
    Please execute sp_spaceused on your local database so that further
    discussion will be more easier to understand.
    The code snippet is as follows :
    SQLCHAR database_size[15];
    SQLCHAR unused[15];
    The database_size is member of first record set and
    unused is member of second recordset returned by the sp_spaceused.
    SQLINTEGER rlength;
    retcode = SQLAllocHandle(SQL_HANDLE_STMT,hDBC,&hStmt);
    if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO)
    {
    retcode = SQLExecDirect(hStmt,(unsigned char *)sqlCommand,
    SQL_NTS);
    retcode = SQLBindCol(hStmt,2, SQL_CHAR, (SQLPOINTER) &database_size,
    sizeof(database_size),&rlength);
    //Problem - was not able to bind any
    column of the second recordset so not able to fetch the unused space.
    if (retcode != SQL_SUCCESS )
    {
    AfxMessageBox("Error occured while binding");
    }
    CString csDatabase_size;
    //The while loop below returns after the first iteration as only first
    recordset is available and nothing is accessible of second recordset so
    cant get 'unused' field
    while ((retcode = SQLFetch(hStmt)) == SQL_SUCCESS)
    {
    stored the return
    values of database_size and unused.
    }
    SQLFreeHandle(SQL_HANDLE_STMT, hStmt);
    }
    else
    {
    AfxMessageBox("error while allocating a statement handle");
    }
    So the Problem is :
    Is there any way to access all recordsets returned by sp_spaceused
    using ODBC APIs on C++?
    Please reply.
    Thanks in advance
    -Ashutosh
    exec sp_spaceused returns:
    Result set 1:
    database_name
    database_size
    unallocated space
    Result set 2:
    reserved
    data
    index_size
    unused
    So, from your description you are trying to get database_size (col2) from
    first result set, and unused (col4) from second result set.
    You have to:
    SQLExecDirect()
    SQLBindCol( database_name, col2 )
    SQLFetch() until all records read from first result set
    SQLMoreResults() if returns SQL_SUCESS then you have another result set, so
    ...
    SQLFreeStmt( SQL_UNBIND )
    SQLBindCol( unused, col4 )
    SQLFetch() until all records read from second result set
    cmk
    |||Thanx alot for your help !
    Chris Kushnir wrote:
    > exec sp_spaceused returns:
    > Result set 1:
    > database_name
    > database_size
    > unallocated space
    > Result set 2:
    > reserved
    > data
    > index_size
    > unused
    > So, from your description you are trying to get database_size (col2) from
    > first result set, and unused (col4) from second result set.
    > You have to:
    > SQLExecDirect()
    > SQLBindCol( database_name, col2 )
    > SQLFetch() until all records read from first result set
    > SQLMoreResults() if returns SQL_SUCESS then you have another result set, so
    > ...
    > SQLFreeStmt( SQL_UNBIND )
    > SQLBindCol( unused, col4 )
    > SQLFetch() until all records read from second result set
    >
    > cmk