Showing posts with label dll. Show all posts
Showing posts with label dll. Show all posts

Tuesday, March 6, 2012

ADOMD.NET Compression Not Working

I am using AdomdConnection to connect to analysis services over http through the msmdpump.dll in IIS. Here's my connection string...

connectionString="Provider=MSOLAP.3;user id=auserid;password=apassword;Data Source=http://servername/olap/msmdpump.dll; Initial Catalog=CatalogName; Transport Compression=Compressed; Compression Level=9;"

Everything works but some of the cellsets returned are large and I need compression. It is not returning a compressed http response. When I sniff the http request I do not see 'Accept-Encoding: gzip,deflate'. If I hit a regular web page with IE I see this in the http request headers and the content returned is compressed.

Any ideas anyone?

Thanks ahead of time.

Rich

This is a known problem and will be fixed in SP1.

_-_-_ Dave

Friday, February 24, 2012

ADO.NET Failed to load msxmlsql.dll

ADO.NET Failed to load msxmlsql.dll
How to fix this error?
System.Data.SqlClient.SqlException: Failed to load msxmlsql.dll.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
am i missing something that needs to be installed on sql server? is this a
client side ado.net issue?Hello Daniel,

> System.Data.SqlClient.SqlException: Failed to load msxmlsql.dll.
> at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
> cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
> at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
> am i missing something that needs to be installed on sql server? is
> this a client side ado.net issue?
What query are you executing?
How does the code throwing the error look like?
Were is that code running?
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/|||Dear Daniel
ADO.Net does not load msxmlsql.dll.
Can you please contact me directly (remove the online part) so we can try to
find the root cause?
Thanks
Michael
"Kent Tegels" <ktegels@.develop.com> wrote in message
news:b87ad7432fe88c80084390e9a5b@.news.microsoft.com...
> Hello Daniel,
>
> What query are you executing?
> How does the code throwing the error look like?
> Were is that code running?
> Thank you,
> Kent Tegels
> DevelopMentor
> http://staff.develop.com/ktegels/
>

ADO.NET Failed to load msxmlsql.dll

ADO.NET Failed to load msxmlsql.dll
How to fix this error?
System.Data.SqlClient.SqlException: Failed to load msxmlsql.dll.
at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
am i missing something that needs to be installed on sql server? is this a
client side ado.net issue?
Hello Daniel,

> System.Data.SqlClient.SqlException: Failed to load msxmlsql.dll.
> at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
> cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
> at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
> am i missing something that needs to be installed on sql server? is
> this a client side ado.net issue?
What query are you executing?
How does the code throwing the error look like?
Were is that code running?
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/
|||Dear Daniel
ADO.Net does not load msxmlsql.dll.
Can you please contact me directly (remove the online part) so we can try to
find the root cause?
Thanks
Michael
"Kent Tegels" <ktegels@.develop.com> wrote in message
news:b87ad7432fe88c80084390e9a5b@.news.microsoft.co m...
> Hello Daniel,
>
> What query are you executing?
> How does the code throwing the error look like?
> Were is that code running?
> Thank you,
> Kent Tegels
> DevelopMentor
> http://staff.develop.com/ktegels/
>

ADO Stored Procedure Question

For the stored procedure I have below (with part of the VB code) that runs in
Query Analyzer and returns a value, but when I run it from a VB DLL, I do not
get anything back in my output parameter and I do not get an error. Can
someone tell me what I am doing wrong?
cmdImageProperty.Parameters.Append
cmdImageProperty.CreateParameter("returnValue", adInteger, adParamReturnValue)
cmdImageProperty.Parameters.Append
cmdImageProperty.CreateParameter("siteID", adInteger, adParamInput, ,
rs("site_id"))
cmdImageProperty.Parameters.Append
cmdImageProperty.CreateParameter("PropertyValue", adVarChar, adParamOutput,
25)
cmdImageProperty.Execute
Alter Procedure GetImageProperty (@.siteID Int, @.propertyValue varchar(25)
Output) As
SELECT @.propertyValue = property_value
FROM site_properties
WHERE site_id = @.siteID AND property_type_id = 18
If @.propertyValue = ''
SELECT @.propertyValue = client_site_id FROM sites WHERE site_id = @.siteID
Return @.@.ErrorTry adding SET NOCOUNT ON to the beginning of your proc. This will suppress
DONE_IN_PROC messages that can cause issues with ADO apps.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
news:27532132-6943-441D-9117-80148A2E4036@.microsoft.com...
> For the stored procedure I have below (with part of the VB code) that runs
> in
> Query Analyzer and returns a value, but when I run it from a VB DLL, I do
> not
> get anything back in my output parameter and I do not get an error. Can
> someone tell me what I am doing wrong?
> cmdImageProperty.Parameters.Append
> cmdImageProperty.CreateParameter("returnValue", adInteger,
> adParamReturnValue)
> cmdImageProperty.Parameters.Append
> cmdImageProperty.CreateParameter("siteID", adInteger, adParamInput, ,
> rs("site_id"))
> cmdImageProperty.Parameters.Append
> cmdImageProperty.CreateParameter("PropertyValue", adVarChar,
> adParamOutput,
> 25)
> cmdImageProperty.Execute
> Alter Procedure GetImageProperty (@.siteID Int, @.propertyValue varchar(25)
> Output) As
> SELECT @.propertyValue = property_value
> FROM site_properties
> WHERE site_id = @.siteID AND property_type_id = 18
> If @.propertyValue = ''
> SELECT @.propertyValue = client_site_id FROM sites WHERE site_id = @.siteID
> Return @.@.Error|||I just tried this this morning and unfortunately it did not work. Funny thing
is...if I only have one select statement in my procedure, it works fine. I
don't want to have to run back and forth to SQL Server two times for a simple
lookup. Any other suggestions?
Also, if you don't mind me piggy backing on this one, I have another
question posted that seems it is being ignored. Can you please look for a
post on the 23rd with the subject "Update one column from another column and
table".
You've answered a few of my questions before...thanks a lot for your
continued help.
"Dan Guzman" wrote:
> Try adding SET NOCOUNT ON to the beginning of your proc. This will suppress
> DONE_IN_PROC messages that can cause issues with ADO apps.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
> news:27532132-6943-441D-9117-80148A2E4036@.microsoft.com...
> > For the stored procedure I have below (with part of the VB code) that runs
> > in
> > Query Analyzer and returns a value, but when I run it from a VB DLL, I do
> > not
> > get anything back in my output parameter and I do not get an error. Can
> > someone tell me what I am doing wrong?
> >
> > cmdImageProperty.Parameters.Append
> > cmdImageProperty.CreateParameter("returnValue", adInteger,
> > adParamReturnValue)
> > cmdImageProperty.Parameters.Append
> > cmdImageProperty.CreateParameter("siteID", adInteger, adParamInput, ,
> > rs("site_id"))
> > cmdImageProperty.Parameters.Append
> > cmdImageProperty.CreateParameter("PropertyValue", adVarChar,
> > adParamOutput,
> > 25)
> > cmdImageProperty.Execute
> >
> > Alter Procedure GetImageProperty (@.siteID Int, @.propertyValue varchar(25)
> > Output) As
> >
> > SELECT @.propertyValue = property_value
> > FROM site_properties
> > WHERE site_id = @.siteID AND property_type_id = 18
> >
> > If @.propertyValue = ''
> > SELECT @.propertyValue = client_site_id FROM sites WHERE site_id = @.siteID
> >
> > Return @.@.Error
>
>|||In case anyone reads this and has the same issue. It seems that there is no
way to do this with the command object. I was able to accomplish this using a
recordset object and the method NextRecordSet. So in my stored procedure, I
am explicitly doing two select statements (I don't care at this point which
one is blank). Then in my VB app, I am checking the primary recordset that I
want and if it is blank, I then use the Set rs = rs.NextRecordSet to use the
next recordset that was returned, which has the item I want.
Since I am only returning one field (in this instance), If anyone knows how
to do this with a command object, I would really appreciate an example.
"Mike Collins" wrote:
> I just tried this this morning and unfortunately it did not work. Funny thing
> is...if I only have one select statement in my procedure, it works fine. I
> don't want to have to run back and forth to SQL Server two times for a simple
> lookup. Any other suggestions?
> Also, if you don't mind me piggy backing on this one, I have another
> question posted that seems it is being ignored. Can you please look for a
> post on the 23rd with the subject "Update one column from another column and
> table".
> You've answered a few of my questions before...thanks a lot for your
> continued help.
> "Dan Guzman" wrote:
> > Try adding SET NOCOUNT ON to the beginning of your proc. This will suppress
> > DONE_IN_PROC messages that can cause issues with ADO apps.
> >
> > --
> > Hope this helps.
> >
> > Dan Guzman
> > SQL Server MVP
> >
> > "Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
> > news:27532132-6943-441D-9117-80148A2E4036@.microsoft.com...
> > > For the stored procedure I have below (with part of the VB code) that runs
> > > in
> > > Query Analyzer and returns a value, but when I run it from a VB DLL, I do
> > > not
> > > get anything back in my output parameter and I do not get an error. Can
> > > someone tell me what I am doing wrong?
> > >
> > > cmdImageProperty.Parameters.Append
> > > cmdImageProperty.CreateParameter("returnValue", adInteger,
> > > adParamReturnValue)
> > > cmdImageProperty.Parameters.Append
> > > cmdImageProperty.CreateParameter("siteID", adInteger, adParamInput, ,
> > > rs("site_id"))
> > > cmdImageProperty.Parameters.Append
> > > cmdImageProperty.CreateParameter("PropertyValue", adVarChar,
> > > adParamOutput,
> > > 25)
> > > cmdImageProperty.Execute
> > >
> > > Alter Procedure GetImageProperty (@.siteID Int, @.propertyValue varchar(25)
> > > Output) As
> > >
> > > SELECT @.propertyValue = property_value
> > > FROM site_properties
> > > WHERE site_id = @.siteID AND property_type_id = 18
> > >
> > > If @.propertyValue = ''
> > > SELECT @.propertyValue = client_site_id FROM sites WHERE site_id = @.siteID
> > >
> > > Return @.@.Error
> >
> >
> >|||Mike, I ran the following code snippet and was able to retrieve the output
parameter without NextRecordset. I'm not sure what might be different in
your environment, though.
cmdImageProperty.Parameters.Append _
cmdImageProperty.CreateParameter( _
"returnValue", adInteger, adParamReturnValue)
cmdImageProperty.Parameters.Append
cmdImageProperty.CreateParameter( _
"siteID", adInteger, adParamInput, ,2)
cmdImageProperty.Parameters.Append _
cmdImageProperty.CreateParameter( _
"PropertyValue", adVarChar, adParamOutput,25)
cmdImageProperty.Execute
MsgBox cmdImageProperty.Parameters(2)
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
news:C70CC9A8-2DDC-43E1-970B-0C43E353DBFF@.microsoft.com...
> In case anyone reads this and has the same issue. It seems that there is
> no
> way to do this with the command object. I was able to accomplish this
> using a
> recordset object and the method NextRecordSet. So in my stored procedure,
> I
> am explicitly doing two select statements (I don't care at this point
> which
> one is blank). Then in my VB app, I am checking the primary recordset that
> I
> want and if it is blank, I then use the Set rs = rs.NextRecordSet to use
> the
> next recordset that was returned, which has the item I want.
> Since I am only returning one field (in this instance), If anyone knows
> how
> to do this with a command object, I would really appreciate an example.
> "Mike Collins" wrote:
>> I just tried this this morning and unfortunately it did not work. Funny
>> thing
>> is...if I only have one select statement in my procedure, it works fine.
>> I
>> don't want to have to run back and forth to SQL Server two times for a
>> simple
>> lookup. Any other suggestions?
>> Also, if you don't mind me piggy backing on this one, I have another
>> question posted that seems it is being ignored. Can you please look for a
>> post on the 23rd with the subject "Update one column from another column
>> and
>> table".
>> You've answered a few of my questions before...thanks a lot for your
>> continued help.
>> "Dan Guzman" wrote:
>> > Try adding SET NOCOUNT ON to the beginning of your proc. This will
>> > suppress
>> > DONE_IN_PROC messages that can cause issues with ADO apps.
>> >
>> > --
>> > Hope this helps.
>> >
>> > Dan Guzman
>> > SQL Server MVP
>> >
>> > "Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
>> > news:27532132-6943-441D-9117-80148A2E4036@.microsoft.com...
>> > > For the stored procedure I have below (with part of the VB code) that
>> > > runs
>> > > in
>> > > Query Analyzer and returns a value, but when I run it from a VB DLL,
>> > > I do
>> > > not
>> > > get anything back in my output parameter and I do not get an error.
>> > > Can
>> > > someone tell me what I am doing wrong?
>> > >
>> > > cmdImageProperty.Parameters.Append
>> > > cmdImageProperty.CreateParameter("returnValue", adInteger,
>> > > adParamReturnValue)
>> > > cmdImageProperty.Parameters.Append
>> > > cmdImageProperty.CreateParameter("siteID", adInteger, adParamInput, ,
>> > > rs("site_id"))
>> > > cmdImageProperty.Parameters.Append
>> > > cmdImageProperty.CreateParameter("PropertyValue", adVarChar,
>> > > adParamOutput,
>> > > 25)
>> > > cmdImageProperty.Execute
>> > >
>> > > Alter Procedure GetImageProperty (@.siteID Int, @.propertyValue
>> > > varchar(25)
>> > > Output) As
>> > >
>> > > SELECT @.propertyValue = property_value
>> > > FROM site_properties
>> > > WHERE site_id = @.siteID AND property_type_id = 18
>> > >
>> > > If @.propertyValue = ''
>> > > SELECT @.propertyValue = client_site_id FROM sites WHERE site_id =>> > > @.siteID
>> > >
>> > > Return @.@.Error
>> >
>> >
>> >|||Thank you. I'm not sure what is different in my system yet, but I will
continue to look. I was wondering if it has anything to do with me setting
the connection's cursor location to client side. I was able to set up a
recordset, and return what I needed by expliciting running both select
statements and checking the recordset of each using NextRecordset. Not the
way I wanted, but it will work for now.
"Dan Guzman" wrote:
> Mike, I ran the following code snippet and was able to retrieve the output
> parameter without NextRecordset. I'm not sure what might be different in
> your environment, though.
> cmdImageProperty.Parameters.Append _
> cmdImageProperty.CreateParameter( _
> "returnValue", adInteger, adParamReturnValue)
> cmdImageProperty.Parameters.Append
> cmdImageProperty.CreateParameter( _
> "siteID", adInteger, adParamInput, ,2)
> cmdImageProperty.Parameters.Append _
> cmdImageProperty.CreateParameter( _
> "PropertyValue", adVarChar, adParamOutput,25)
> cmdImageProperty.Execute
> MsgBox cmdImageProperty.Parameters(2)
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
> news:C70CC9A8-2DDC-43E1-970B-0C43E353DBFF@.microsoft.com...
> > In case anyone reads this and has the same issue. It seems that there is
> > no
> > way to do this with the command object. I was able to accomplish this
> > using a
> > recordset object and the method NextRecordSet. So in my stored procedure,
> > I
> > am explicitly doing two select statements (I don't care at this point
> > which
> > one is blank). Then in my VB app, I am checking the primary recordset that
> > I
> > want and if it is blank, I then use the Set rs = rs.NextRecordSet to use
> > the
> > next recordset that was returned, which has the item I want.
> >
> > Since I am only returning one field (in this instance), If anyone knows
> > how
> > to do this with a command object, I would really appreciate an example.
> >
> > "Mike Collins" wrote:
> >
> >> I just tried this this morning and unfortunately it did not work. Funny
> >> thing
> >> is...if I only have one select statement in my procedure, it works fine.
> >> I
> >> don't want to have to run back and forth to SQL Server two times for a
> >> simple
> >> lookup. Any other suggestions?
> >>
> >> Also, if you don't mind me piggy backing on this one, I have another
> >> question posted that seems it is being ignored. Can you please look for a
> >> post on the 23rd with the subject "Update one column from another column
> >> and
> >> table".
> >>
> >> You've answered a few of my questions before...thanks a lot for your
> >> continued help.
> >>
> >> "Dan Guzman" wrote:
> >>
> >> > Try adding SET NOCOUNT ON to the beginning of your proc. This will
> >> > suppress
> >> > DONE_IN_PROC messages that can cause issues with ADO apps.
> >> >
> >> > --
> >> > Hope this helps.
> >> >
> >> > Dan Guzman
> >> > SQL Server MVP
> >> >
> >> > "Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
> >> > news:27532132-6943-441D-9117-80148A2E4036@.microsoft.com...
> >> > > For the stored procedure I have below (with part of the VB code) that
> >> > > runs
> >> > > in
> >> > > Query Analyzer and returns a value, but when I run it from a VB DLL,
> >> > > I do
> >> > > not
> >> > > get anything back in my output parameter and I do not get an error.
> >> > > Can
> >> > > someone tell me what I am doing wrong?
> >> > >
> >> > > cmdImageProperty.Parameters.Append
> >> > > cmdImageProperty.CreateParameter("returnValue", adInteger,
> >> > > adParamReturnValue)
> >> > > cmdImageProperty.Parameters.Append
> >> > > cmdImageProperty.CreateParameter("siteID", adInteger, adParamInput, ,
> >> > > rs("site_id"))
> >> > > cmdImageProperty.Parameters.Append
> >> > > cmdImageProperty.CreateParameter("PropertyValue", adVarChar,
> >> > > adParamOutput,
> >> > > 25)
> >> > > cmdImageProperty.Execute
> >> > >
> >> > > Alter Procedure GetImageProperty (@.siteID Int, @.propertyValue
> >> > > varchar(25)
> >> > > Output) As
> >> > >
> >> > > SELECT @.propertyValue = property_value
> >> > > FROM site_properties
> >> > > WHERE site_id = @.siteID AND property_type_id = 18
> >> > >
> >> > > If @.propertyValue = ''
> >> > > SELECT @.propertyValue = client_site_id FROM sites WHERE site_id => >> > > @.siteID
> >> > >
> >> > > Return @.@.Error
> >> >
> >> >
> >> >
>
>

ADO Stored Procedure Question

For the stored procedure I have below (with part of the VB code) that runs in
Query Analyzer and returns a value, but when I run it from a VB DLL, I do not
get anything back in my output parameter and I do not get an error. Can
someone tell me what I am doing wrong?
cmdImageProperty.Parameters.Append
cmdImageProperty.CreateParameter("returnValue", adInteger, adParamReturnValue)
cmdImageProperty.Parameters.Append
cmdImageProperty.CreateParameter("siteID", adInteger, adParamInput, ,
rs("site_id"))
cmdImageProperty.Parameters.Append
cmdImageProperty.CreateParameter("PropertyValue", adVarChar, adParamOutput,
25)
cmdImageProperty.Execute
Alter Procedure GetImageProperty (@.siteID Int, @.propertyValue varchar(25)
Output) As
SELECT @.propertyValue = property_value
FROM site_properties
WHERE site_id = @.siteID AND property_type_id = 18
If @.propertyValue = ''
SELECT @.propertyValue = client_site_id FROM sites WHERE site_id = @.siteID
Return @.@.Error
Try adding SET NOCOUNT ON to the beginning of your proc. This will suppress
DONE_IN_PROC messages that can cause issues with ADO apps.
Hope this helps.
Dan Guzman
SQL Server MVP
"Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
news:27532132-6943-441D-9117-80148A2E4036@.microsoft.com...
> For the stored procedure I have below (with part of the VB code) that runs
> in
> Query Analyzer and returns a value, but when I run it from a VB DLL, I do
> not
> get anything back in my output parameter and I do not get an error. Can
> someone tell me what I am doing wrong?
> cmdImageProperty.Parameters.Append
> cmdImageProperty.CreateParameter("returnValue", adInteger,
> adParamReturnValue)
> cmdImageProperty.Parameters.Append
> cmdImageProperty.CreateParameter("siteID", adInteger, adParamInput, ,
> rs("site_id"))
> cmdImageProperty.Parameters.Append
> cmdImageProperty.CreateParameter("PropertyValue", adVarChar,
> adParamOutput,
> 25)
> cmdImageProperty.Execute
> Alter Procedure GetImageProperty (@.siteID Int, @.propertyValue varchar(25)
> Output) As
> SELECT @.propertyValue = property_value
> FROM site_properties
> WHERE site_id = @.siteID AND property_type_id = 18
> If @.propertyValue = ''
> SELECT @.propertyValue = client_site_id FROM sites WHERE site_id = @.siteID
> Return @.@.Error
|||I just tried this this morning and unfortunately it did not work. Funny thing
is...if I only have one select statement in my procedure, it works fine. I
don't want to have to run back and forth to SQL Server two times for a simple
lookup. Any other suggestions?
Also, if you don't mind me piggy backing on this one, I have another
question posted that seems it is being ignored. Can you please look for a
post on the 23rd with the subject "Update one column from another column and
table".
You've answered a few of my questions before...thanks a lot for your
continued help.
"Dan Guzman" wrote:

> Try adding SET NOCOUNT ON to the beginning of your proc. This will suppress
> DONE_IN_PROC messages that can cause issues with ADO apps.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
> news:27532132-6943-441D-9117-80148A2E4036@.microsoft.com...
>
>
|||In case anyone reads this and has the same issue. It seems that there is no
way to do this with the command object. I was able to accomplish this using a
recordset object and the method NextRecordSet. So in my stored procedure, I
am explicitly doing two select statements (I don't care at this point which
one is blank). Then in my VB app, I am checking the primary recordset that I
want and if it is blank, I then use the Set rs = rs.NextRecordSet to use the
next recordset that was returned, which has the item I want.
Since I am only returning one field (in this instance), If anyone knows how
to do this with a command object, I would really appreciate an example.
"Mike Collins" wrote:
[vbcol=seagreen]
> I just tried this this morning and unfortunately it did not work. Funny thing
> is...if I only have one select statement in my procedure, it works fine. I
> don't want to have to run back and forth to SQL Server two times for a simple
> lookup. Any other suggestions?
> Also, if you don't mind me piggy backing on this one, I have another
> question posted that seems it is being ignored. Can you please look for a
> post on the 23rd with the subject "Update one column from another column and
> table".
> You've answered a few of my questions before...thanks a lot for your
> continued help.
> "Dan Guzman" wrote:
|||Mike, I ran the following code snippet and was able to retrieve the output
parameter without NextRecordset. I'm not sure what might be different in
your environment, though.
cmdImageProperty.Parameters.Append _
cmdImageProperty.CreateParameter( _
"returnValue", adInteger, adParamReturnValue)
cmdImageProperty.Parameters.Append
cmdImageProperty.CreateParameter( _
"siteID", adInteger, adParamInput, ,2)
cmdImageProperty.Parameters.Append _
cmdImageProperty.CreateParameter( _
"PropertyValue", adVarChar, adParamOutput,25)
cmdImageProperty.Execute
MsgBox cmdImageProperty.Parameters(2)
Hope this helps.
Dan Guzman
SQL Server MVP
"Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
news:C70CC9A8-2DDC-43E1-970B-0C43E353DBFF@.microsoft.com...[vbcol=seagreen]
> In case anyone reads this and has the same issue. It seems that there is
> no
> way to do this with the command object. I was able to accomplish this
> using a
> recordset object and the method NextRecordSet. So in my stored procedure,
> I
> am explicitly doing two select statements (I don't care at this point
> which
> one is blank). Then in my VB app, I am checking the primary recordset that
> I
> want and if it is blank, I then use the Set rs = rs.NextRecordSet to use
> the
> next recordset that was returned, which has the item I want.
> Since I am only returning one field (in this instance), If anyone knows
> how
> to do this with a command object, I would really appreciate an example.
> "Mike Collins" wrote:
|||Thank you. I'm not sure what is different in my system yet, but I will
continue to look. I was wondering if it has anything to do with me setting
the connection's cursor location to client side. I was able to set up a
recordset, and return what I needed by expliciting running both select
statements and checking the recordset of each using NextRecordset. Not the
way I wanted, but it will work for now.
"Dan Guzman" wrote:

> Mike, I ran the following code snippet and was able to retrieve the output
> parameter without NextRecordset. I'm not sure what might be different in
> your environment, though.
> cmdImageProperty.Parameters.Append _
> cmdImageProperty.CreateParameter( _
> "returnValue", adInteger, adParamReturnValue)
> cmdImageProperty.Parameters.Append
> cmdImageProperty.CreateParameter( _
> "siteID", adInteger, adParamInput, ,2)
> cmdImageProperty.Parameters.Append _
> cmdImageProperty.CreateParameter( _
> "PropertyValue", adVarChar, adParamOutput,25)
> cmdImageProperty.Execute
> MsgBox cmdImageProperty.Parameters(2)
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
> news:C70CC9A8-2DDC-43E1-970B-0C43E353DBFF@.microsoft.com...
>
>

ADO Stored Procedure Question

For the stored procedure I have below (with part of the VB code) that runs i
n
Query Analyzer and returns a value, but when I run it from a VB DLL, I do no
t
get anything back in my output parameter and I do not get an error. Can
someone tell me what I am doing wrong?
cmdImageProperty.Parameters.Append
cmdImageProperty.CreateParameter("returnValue", adInteger, adParamReturnValu
e)
cmdImageProperty.Parameters.Append
cmdImageProperty.CreateParameter("siteID", adInteger, adParamInput, ,
rs("site_id"))
cmdImageProperty.Parameters.Append
cmdImageProperty.CreateParameter("PropertyValue", adVarChar, adParamOutput,
25)
cmdImageProperty.Execute
Alter Procedure GetImageProperty (@.siteID Int, @.propertyValue varchar(25)
Output) As
SELECT @.propertyValue = property_value
FROM site_properties
WHERE site_id = @.siteID AND property_type_id = 18
If @.propertyValue = ''
SELECT @.propertyValue = client_site_id FROM sites WHERE site_id = @.siteID
Return @.@.ErrorTry adding SET NOCOUNT ON to the beginning of your proc. This will suppress
DONE_IN_PROC messages that can cause issues with ADO apps.
Hope this helps.
Dan Guzman
SQL Server MVP
"Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
news:27532132-6943-441D-9117-80148A2E4036@.microsoft.com...
> For the stored procedure I have below (with part of the VB code) that runs
> in
> Query Analyzer and returns a value, but when I run it from a VB DLL, I do
> not
> get anything back in my output parameter and I do not get an error. Can
> someone tell me what I am doing wrong?
> cmdImageProperty.Parameters.Append
> cmdImageProperty.CreateParameter("returnValue", adInteger,
> adParamReturnValue)
> cmdImageProperty.Parameters.Append
> cmdImageProperty.CreateParameter("siteID", adInteger, adParamInput, ,
> rs("site_id"))
> cmdImageProperty.Parameters.Append
> cmdImageProperty.CreateParameter("PropertyValue", adVarChar,
> adParamOutput,
> 25)
> cmdImageProperty.Execute
> Alter Procedure GetImageProperty (@.siteID Int, @.propertyValue varchar(25)
> Output) As
> SELECT @.propertyValue = property_value
> FROM site_properties
> WHERE site_id = @.siteID AND property_type_id = 18
> If @.propertyValue = ''
> SELECT @.propertyValue = client_site_id FROM sites WHERE site_id = @.siteID
> Return @.@.Error|||I just tried this this morning and unfortunately it did not work. Funny thin
g
is...if I only have one select statement in my procedure, it works fine. I
don't want to have to run back and forth to SQL Server two times for a simpl
e
lookup. Any other suggestions?
Also, if you don't mind me piggy backing on this one, I have another
question posted that seems it is being ignored. Can you please look for a
post on the 23rd with the subject "Update one column from another column and
table".
You've answered a few of my questions before...thanks a lot for your
continued help.
"Dan Guzman" wrote:

> Try adding SET NOCOUNT ON to the beginning of your proc. This will suppre
ss
> DONE_IN_PROC messages that can cause issues with ADO apps.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
> news:27532132-6943-441D-9117-80148A2E4036@.microsoft.com...
>
>|||In case anyone reads this and has the same issue. It seems that there is no
way to do this with the command object. I was able to accomplish this using
a
recordset object and the method NextRecordSet. So in my stored procedure, I
am explicitly doing two select statements (I don't care at this point which
one is blank). Then in my VB app, I am checking the primary recordset that I
want and if it is blank, I then use the Set rs = rs.NextRecordSet to use the
next recordset that was returned, which has the item I want.
Since I am only returning one field (in this instance), If anyone knows how
to do this with a command object, I would really appreciate an example.
"Mike Collins" wrote:
[vbcol=seagreen]
> I just tried this this morning and unfortunately it did not work. Funny th
ing
> is...if I only have one select statement in my procedure, it works fine. I
> don't want to have to run back and forth to SQL Server two times for a sim
ple
> lookup. Any other suggestions?
> Also, if you don't mind me piggy backing on this one, I have another
> question posted that seems it is being ignored. Can you please look for a
> post on the 23rd with the subject "Update one column from another column a
nd
> table".
> You've answered a few of my questions before...thanks a lot for your
> continued help.
> "Dan Guzman" wrote:
>|||Mike, I ran the following code snippet and was able to retrieve the output
parameter without NextRecordset. I'm not sure what might be different in
your environment, though.
cmdImageProperty.Parameters.Append _
cmdImageProperty.CreateParameter( _
"returnValue", adInteger, adParamReturnValue)
cmdImageProperty.Parameters.Append
cmdImageProperty.CreateParameter( _
"siteID", adInteger, adParamInput, ,2)
cmdImageProperty.Parameters.Append _
cmdImageProperty.CreateParameter( _
"PropertyValue", adVarChar, adParamOutput,25)
cmdImageProperty.Execute
MsgBox cmdImageProperty.Parameters(2)
Hope this helps.
Dan Guzman
SQL Server MVP
"Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
news:C70CC9A8-2DDC-43E1-970B-0C43E353DBFF@.microsoft.com...[vbcol=seagreen]
> In case anyone reads this and has the same issue. It seems that there is
> no
> way to do this with the command object. I was able to accomplish this
> using a
> recordset object and the method NextRecordSet. So in my stored procedure,
> I
> am explicitly doing two select statements (I don't care at this point
> which
> one is blank). Then in my VB app, I am checking the primary recordset that
> I
> want and if it is blank, I then use the Set rs = rs.NextRecordSet to use
> the
> next recordset that was returned, which has the item I want.
> Since I am only returning one field (in this instance), If anyone knows
> how
> to do this with a command object, I would really appreciate an example.
> "Mike Collins" wrote:
>|||Thank you. I'm not sure what is different in my system yet, but I will
continue to look. I was wondering if it has anything to do with me setting
the connection's cursor location to client side. I was able to set up a
recordset, and return what I needed by expliciting running both select
statements and checking the recordset of each using NextRecordset. Not the
way I wanted, but it will work for now.
"Dan Guzman" wrote:

> Mike, I ran the following code snippet and was able to retrieve the output
> parameter without NextRecordset. I'm not sure what might be different in
> your environment, though.
> cmdImageProperty.Parameters.Append _
> cmdImageProperty.CreateParameter( _
> "returnValue", adInteger, adParamReturnValue)
> cmdImageProperty.Parameters.Append
> cmdImageProperty.CreateParameter( _
> "siteID", adInteger, adParamInput, ,2)
> cmdImageProperty.Parameters.Append _
> cmdImageProperty.CreateParameter( _
> "PropertyValue", adVarChar, adParamOutput,25)
> cmdImageProperty.Execute
> MsgBox cmdImageProperty.Parameters(2)
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mike Collins" <MikeCollins@.discussions.microsoft.com> wrote in message
> news:C70CC9A8-2DDC-43E1-970B-0C43E353DBFF@.microsoft.com...
>
>

Thursday, February 16, 2012

ADO Error Code[80004005] (Selected collating sequence not supported by the operating

Hi
I am using ADO (mo.dll) to create MS ACCESS database in version
2000. It was working fine. when I tried to create database in version
2002 I got error Code[80004005] (Selected collating sequence not
supported by the operating system) i.e. unspecified error. I don't know
where is the problem.
What I did? I created blank database and then then I used ADO to create
tables with SQL.
If any body have any clue Please let me know
Thnaks
DAVEDave,
Might want to post this to one of the ACCESS NGs or one of the ADO NGs.
HTH
Jerry
"Dave" <dbsan@.yahoo.com> wrote in message
news:1129740108.529321.93180@.f14g2000cwb.googlegroups.com...
> Hi
> I am using ADO (mo.dll) to create MS ACCESS database in version
> 2000. It was working fine. when I tried to create database in version
> 2002 I got error Code[80004005] (Selected collating sequence not
> supported by the operating system) i.e. unspecified error. I don't know
> where is the problem.
> What I did? I created blank database and then then I used ADO to create
> tables with SQL.
> If any body have any clue Please let me know
> Thnaks
> DAVE
>