DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2006

    Extracting Value

    So I am updating a couple of tables. In the second table (Treatment) I need to get the Staff_Assignment value. This is an automatic incremented Primary Key. How can I extract that, and write it to the Treatment Table?

                rowsAffected = Staff_AssignmentTableAdapter.Insert(SelectedStaff)
                rowsAffected = TreatmentTableAdapter.Insert(Patient_No, Visit_No, Staff_Assignment, Treatment)

  2. #2
    Join Date
    Mar 2006
    I am having a similar problem so let me know if you get it I want to run an insert query like so..

    Dim daDocInsert As New DocInformationTableAdapters.QueriesTableAdapter
    daDocInsert.InputDocInsertCommandTest(dateFiled, typeCode, numberOfPages, summary, transCode, "", Date.Now, "0", "1")

    and there is an additional field which is a GUID and I need to know how to get that value. I know there is a @@identity but I don't know how to use it in VS 2005 or even how VB.net handles the incoming response

  3. #3
    Join Date
    Nov 2003
    Portland, OR
    Phil Weber

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  4. #4
    Join Date
    Mar 2006
    I have restructured everything.

    Dim VisitInsert As SqlCommand
                VisitInsert = New SqlCommand("@Patient_No int, @Diagnosis nvarchar(100), @Symptoms nvarchar(100), @Admission_Date nvarchar(20),	@Discharge_Date nvarchar(20), @Remarks nvarchar(100), @Visit_No int AS INSERT INTO Visit (Patient_No, Diagnosis, Symptoms, Admission_Date, Discharge_Date, Remarks) VALUES (@Patient_No, @Diagnosis, @Symptoms, @Admission_Date, @Discharge_Date, @Remarks) SET @Visit_No = SCOPE_IDENTITY() Return ")
    How to extract @Visit_No to a variable?
    Last edited by claudecalleja; 05-12-2006 at 06:58 AM.

Similar Threads

  1. extracting a table from a html web page
    By bob1983 in forum Java
    Replies: 2
    Last Post: 02-28-2006, 02:27 AM
  2. Extracting two string texts...
    By kepler in forum VB Classic
    Replies: 2
    Last Post: 05-15-2005, 05:14 PM
  3. Extracting from a CAB file
    By Tom Cassidy in forum VB Classic
    Replies: 0
    Last Post: 08-26-2002, 09:16 AM
  4. handling error while extracting records
    By Hardik Sukhadia in forum Java
    Replies: 1
    Last Post: 06-05-2002, 09:04 AM
  5. Replies: 0
    Last Post: 10-18-2001, 05:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.