AnsweredAssumed Answered

bomlistproc<number> basics...

Question asked by Christina Seay on Aug 29, 2011
Latest reply on Sep 8, 2011 by Christina Seay

I am trying to get the BOM out using VB.NET and the BomListProc3 stored procedure in EPDM.  I have the basics of running a stored procedure I think, but I'm lost on where to find the values for the parameters.  (I'm using Visual Studio 2010 and SQL Server Management Studio Express 2005)

 

This is what I have so far:

 

<code>

'Setup SQL Command

        Dim sqlCommand As New SqlCommand("dbol.BomListProc3")

        sqlCommand.Parameters.Add(New SqlParameter("@DocID", SqlDbType.Int).Value = "")

        sqlCommand.Parameters.Add(New SqlParameter("@PrjID", SqlDbType.Int).Value = "")

        sqlCommand.Parameters.Add(New SqlParameter("@Ver", SqlDbType.Int).Value = "")

        sqlCommand.Parameters.Add(New SqlParameter("@CfgID", SqlDbType.Int).Value = "")

        sqlCommand.Parameters.Add(New SqlParameter("@UserID", SqlDbType.Int).Value = "")

        sqlCommand.Parameters.Add(New SqlParameter("@ShellRoot", SqlDbType.NVarChar).Value = "")

        sqlCommand.Parameters.Add(New SqlParameter("@oViewID", SqlDbType.UniqueIdentifier).Value = "")

        sqlCommand.Parameters.Add(New SqlParameter("@bUseLatestVer", SqlDbType.Bit).Value = "")

        sqlCommand.Parameters.Add(New SqlParameter("@bOneLevel", SqlDbType.Bit).Value = "")

        sqlCommand.Parameters.Add(New SqlParameter("@bExcludeRootFromResult", SqlDbType.Bit).Value = "")

        sqlCommand.Parameters.Add(New SqlParameter("@bRespectShowChildrenInResult", SqlDbType.Bit).Value = "")

        sqlCommand.Parameters.Add(New SqlParameter("@bStripItemTags", SqlDbType.Bit).Value = "")

 

 

        Dim sqlConnection As New SqlConnection("Data Source=Astec-sql;Initial Catalog=EPDM_Live_Vault;Persist Security Info=True;User ID=EPDM;Password=EnterpriseQuery...")

        sqlCommand.Connection = sqlConnection

        sqlCommand.CommandType = CommandType.StoredProcedure

 

 

        Dim sqlDataAdapter As New SqlDataAdapter(sqlCommand)

        sqlDataAdapter.SelectCommand.CommandTimeout = 300

 

 

        'Fill the dataset

        Dim sqlDataSet As New DataSet

        sqlDataAdapter.Fill(sqlDataSet)

        sqlConnection.Close()

 

 

        DataGridView_BOM.DataSource = sqlDataSet

</code>

 

Outcomes