Showing posts with label return. Show all posts
Showing posts with label return. Show all posts

Wednesday, March 21, 2012

EXCEL / SQL SERVER HELP - URGENT

I got a stored procedure with 1 parameter and I want to call this stored
procedure inside an Excel Query ,
I tried
.dbo.MySP ?
It return with error message
"Parameters are not allowed in queries that can't be displayed graphically"
The purpose for this approach -
This would allow me to anchor my parameter to certain cells on the
spreadsheet.
My report users could then change the values in those cells and click a
button to refresh the query data.
Thanks
MikeAs long as you are going to use a button, you might try using code like ADO
(using a visual basic control button that is - get from View/Toolbars):
Sub GetData()
Dim cmd As New ADODB.Command, RS As New ADODB.Recordset
Dim DateVar As Date
DateVar = Sheets("Sheet1").Range("A1")
cmd.ActiveConnection = "Provider=SQLOLEDB;Data Source=yourServer;" _
& "Initial Catalog=yourDB;UID=SA;PWD=Tiger;"
cmd.CommandTimeout = 600
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "stp_yourSP"
cmd.Parameters("@.bDate").Value = DateVar
Set RS = cmd.Execute
Sheets("Sheet1").Range("A2").CopyFromRecordset RS
End Sub
The user enters a date value Cell("A1") and then clicks the button. Boom!
starting at Cell("A2") you have your resultset.
HTH
Rich
"MS User" wrote:

> I got a stored procedure with 1 parameter and I want to call this stored
> procedure inside an Excel Query ,
> I tried
> ..dbo.MySP ?
> It return with error message
> "Parameters are not allowed in queries that can't be displayed graphically
"
> The purpose for this approach -
> This would allow me to anchor my parameter to certain cells on the
> spreadsheet.
> My report users could then change the values in those cells and click a
> button to refresh the query data.
> Thanks
> Mike
>
>
>

EXCEL / SQL SERVER HELP - URGENT

I got a stored procedure with 1 parameter and I want to call this stored
procedure inside an Excel Query ,
I tried
..dbo.MySP ?
It return with error message
"Parameters are not allowed in queries that can't be displayed graphically"
The purpose for this approach -
This would allow me to anchor my parameter to certain cells on the
spreadsheet.
My report users could then change the values in those cells and click a
button to refresh the query data.
Thanks
Mike
As long as you are going to use a button, you might try using code like ADO
(using a visual basic control button that is - get from View/Toolbars):
Sub GetData()
Dim cmd As New ADODB.Command, RS As New ADODB.Recordset
Dim DateVar As Date
DateVar = Sheets("Sheet1").Range("A1")
cmd.ActiveConnection = "Provider=SQLOLEDB;Data Source=yourServer;" _
& "Initial Catalog=yourDB;UID=SA;PWD=Tiger;"
cmd.CommandTimeout = 600
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "stp_yourSP"
cmd.Parameters("@.bDate").Value = DateVar
Set RS = cmd.Execute
Sheets("Sheet1").Range("A2").CopyFromRecordset RS
End Sub
The user enters a date value Cell("A1") and then clicks the button. Boom!
starting at Cell("A2") you have your resultset.
HTH
Rich
"MS User" wrote:

> I got a stored procedure with 1 parameter and I want to call this stored
> procedure inside an Excel Query ,
> I tried
> ..dbo.MySP ?
> It return with error message
> "Parameters are not allowed in queries that can't be displayed graphically"
> The purpose for this approach -
> This would allow me to anchor my parameter to certain cells on the
> spreadsheet.
> My report users could then change the values in those cells and click a
> button to refresh the query data.
> Thanks
> Mike
>
>
>

Friday, February 24, 2012

Event ID: 3006

Error reading log event record. Handle specified is
535544. Return code from ReadEventLog is 87.
I am receiving this error message on my SQL server in the
application log. This server is running SQL 200 and
Solomon. I have looked for something addressing this
error on the Microsoft support site and found nothing.
Could you help me with this error and a solution to
correct the problem.
Thanks,
Mike Michael
Regeneration Technologies, Inc.
mmichael@.rtix.com
386-418-8888 x4314Mike,
Is the article at
http://support.microsoft.com/default.aspx?scid=kb;en-us;246912 helpful?
--
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Mike Michael" <mmichael@.rtix.com> wrote in message
news:13bed01c3f79b$1f50b3c0$a601280a@.phx.gbl...
> Error reading log event record. Handle specified is
> 535544. Return code from ReadEventLog is 87.
> I am receiving this error message on my SQL server in the
> application log. This server is running SQL 200 and
> Solomon. I have looked for something addressing this
> error on the Microsoft support site and found nothing.
> Could you help me with this error and a solution to
> correct the problem.
> Thanks,
> Mike Michael
> Regeneration Technologies, Inc.
> mmichael@.rtix.com
> 386-418-8888 x4314

Event ID: 3006

Error reading log event record. Handle specified is
535544. Return code from ReadEventLog is 87.
I am receiving this error message on my SQL server in the
application log. This server is running SQL 200 and
Solomon. I have looked for something addressing this
error on the Microsoft support site and found nothing.
Could you help me with this error and a solution to
correct the problem.
Thanks,
Mike Michael
Regeneration Technologies, Inc.
mmichael@.rtix.com
386-418-8888 x4314Mike,
Is the article at
http://support.microsoft.com/defaul...kb;en-us;246912 helpful?
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Mike Michael" <mmichael@.rtix.com> wrote in message
news:13bed01c3f79b$1f50b3c0$a601280a@.phx
.gbl...
> Error reading log event record. Handle specified is
> 535544. Return code from ReadEventLog is 87.
> I am receiving this error message on my SQL server in the
> application log. This server is running SQL 200 and
> Solomon. I have looked for something addressing this
> error on the Microsoft support site and found nothing.
> Could you help me with this error and a solution to
> correct the problem.
> Thanks,
> Mike Michael
> Regeneration Technologies, Inc.
> mmichael@.rtix.com
> 386-418-8888 x4314