I have a recordset returned from a stored procedure executed in the form open event. Could this recordset append to the form's recordsource property in the form's open event in VB? if so, what's the syntax?
Private Sub Form_Open(Cancel As Integer)
dim ...
Set add_bag_results = Nothing
With add_bag_results
.ActiveConnection = CurrentProject.Connection
.CommandType = adCmdStoredProc
.CommandText = "spSampling_add_bag_results"
.Parameters.Append .CreateParameter("ret_val", adInteger, adParamReturnValue)
'.Parameters.Append .CreateParameter("@.lotnum", adInteger, adParamInput, 4, rs_add_bag_results(1))
.Parameters.Append .CreateParameter("@.lotnum", adInteger, adParamInput, 4, lot_n)
..
Set rs_add_bag_results = .Execute
End With
Me.RecordSource = rs_add_bag_results ?
Thanks!I think this is a very insightfull question but your on the wrong forum for this I think. Try Extreme, VB.com, the response is just as quick and it's the same format as this forum. Frankly, I don't know vb but when I had to use it with asp.net I used Extreme vb forum for my code.|||Thanks for your reply. I did figured it out. You are right and I have posted my questions on vb extreme forum before. Thanks!
Showing posts with label returned. Show all posts
Showing posts with label returned. Show all posts
Sunday, February 19, 2012
Thursday, February 16, 2012
append items to a dataset
Hi,
I have a dataset, which is used for a listbox to display items. I
need to append new static items to the ones returned by the dataset, without
making any changes to the original db. Can anyone help'
ThanksHi!
Not sure if this is exactly what you want, but if you edit the dataset
and then select the fields tab, you can add fields on that screen. For
'type' select calculated.
Bob
"Loui Mercieca" <loui@.gfi.com> wrote in message
news:eqgmsQymEHA.3868@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I have a dataset, which is used for a listbox to display items. I
> need to append new static items to the ones returned by the dataset,
without
> making any changes to the original db. Can anyone help'
> Thanks
>|||Note: Right clicking in Report Designer's Fields Window will expose adding,
editing, or deleting fields.
You can combine static text with data returned from a query in a textbox by
using an expression:
="Some static text" & Fields!<FieldName>.Value
This notion can be extended to handle situations where the static text needs
to be applied dynamically.
Assume that field in the example is an integer:
=iif(Fields!<FieldName>.Value < 100, "The target was missed: " &
Fields!<FieldName>.Value, "The target was exceed: " &
Fields!<FieldName>.Value)
Please see using expression in SQL Server 2000 Reporting Services BOL.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bob Hug" <JediMasterHug@._Remove_bobhug.com> wrote in message
news:%23308m6zmEHA.596@.TK2MSFTNGP11.phx.gbl...
> Hi!
> Not sure if this is exactly what you want, but if you edit the dataset
> and then select the fields tab, you can add fields on that screen. For
> 'type' select calculated.
> Bob
> "Loui Mercieca" <loui@.gfi.com> wrote in message
> news:eqgmsQymEHA.3868@.TK2MSFTNGP11.phx.gbl...
> > Hi,
> > I have a dataset, which is used for a listbox to display items.
I
> > need to append new static items to the ones returned by the dataset,
> without
> > making any changes to the original db. Can anyone help'
> >
> > Thanks
> >
> >
>
I have a dataset, which is used for a listbox to display items. I
need to append new static items to the ones returned by the dataset, without
making any changes to the original db. Can anyone help'
ThanksHi!
Not sure if this is exactly what you want, but if you edit the dataset
and then select the fields tab, you can add fields on that screen. For
'type' select calculated.
Bob
"Loui Mercieca" <loui@.gfi.com> wrote in message
news:eqgmsQymEHA.3868@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I have a dataset, which is used for a listbox to display items. I
> need to append new static items to the ones returned by the dataset,
without
> making any changes to the original db. Can anyone help'
> Thanks
>|||Note: Right clicking in Report Designer's Fields Window will expose adding,
editing, or deleting fields.
You can combine static text with data returned from a query in a textbox by
using an expression:
="Some static text" & Fields!<FieldName>.Value
This notion can be extended to handle situations where the static text needs
to be applied dynamically.
Assume that field in the example is an integer:
=iif(Fields!<FieldName>.Value < 100, "The target was missed: " &
Fields!<FieldName>.Value, "The target was exceed: " &
Fields!<FieldName>.Value)
Please see using expression in SQL Server 2000 Reporting Services BOL.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bob Hug" <JediMasterHug@._Remove_bobhug.com> wrote in message
news:%23308m6zmEHA.596@.TK2MSFTNGP11.phx.gbl...
> Hi!
> Not sure if this is exactly what you want, but if you edit the dataset
> and then select the fields tab, you can add fields on that screen. For
> 'type' select calculated.
> Bob
> "Loui Mercieca" <loui@.gfi.com> wrote in message
> news:eqgmsQymEHA.3868@.TK2MSFTNGP11.phx.gbl...
> > Hi,
> > I have a dataset, which is used for a listbox to display items.
I
> > need to append new static items to the ones returned by the dataset,
> without
> > making any changes to the original db. Can anyone help'
> >
> > Thanks
> >
> >
>
Subscribe to:
Posts (Atom)