Output parameter in Typed Dataset

  • Thread starter Thread starter Curt Gough
  • Start date Start date
C

Curt Gough

I am using Typed Datasets in VS2005 based on SQL Stored Procedures. When I
do an Insert (using an Insert Procedure), I have set the SP to return a new
ID number. However, I don't know how to reference that returned value to
populate the Identity field on my Windows form. I'm pretty new to VB.NET -
actually to almost all VB (came from VBA in Access 2003). So, speak slowly
and use small words and sentences. Thanks for any help.
 
No. Not yet, Robin. The books and online documentation I find offer little
help, too. It is frustrating. Thanks for responding.
 
Okay, I'll look at it and see if I can figure it out. Maybe strongly typed
datasets don't allow you to pick up an output parameter?

So you're using stored procs to select, insert, etc., and you're using
typed datasets, right?

Did you specify any info about an output parameter in the typed dataset
definition?

Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
-----------------------------------------------
 
No, I didn't, mainly because I'm not sure how to retrieve it, or how to even
reference it.
 
Well, you *can* add an output parameter to a strongly typed dataset.

Assuming you have a strongly typed dataset, click on the table adapter that
was generated. Then over in the properties, pick your Insert command (for
example) and click on the (...) next to Parameters. On that screen, you can
change the parameter's direction.

Presumably if you do that, it will have some method in the generated code
that gets that output parameter.

Take a look at it and see where you get from there.

Robin S.
-------------------------------------------
 
Back
Top