Advertisement

07.04.2008 at 08:56AM PDT, ID: 23539671
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

Vb.net: problem calling Sql Server Procedure.

Asked by emi_sastra in Microsoft Visual Basic.Net, SQL Server 2005

Tags: , ,

Hi,

I have a problem with the store procedure.

Please help what's wrong with my code.

Thank you.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
Public Shared Sub Create_sp_Public_Call(ByVal strConnection As String)
 
        Using conApp As New SqlConnection(strConnection)
            conApp.Open()
 
            Using cmdSqlCommand As New SqlCommand("SELECT COUNT(*) FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME='sp_Public_Call'", conApp)
                If CType(cmdSqlCommand.ExecuteScalar, Integer) > 0 Then
                    cmdSqlCommand.CommandText = "DROP PROCEDURE sp_Public_Call"
 
                    Try
                        cmdSqlCommand.ExecuteNonQuery()
                    Catch ex As Exception
                        MsgBox("Cannot continue!" & vbCrLf & vbCrLf & "Failed to create the stored procedure.")
                    End Try
                End If
 
                cmdSqlCommand.CommandText = "CREATE PROCEDURE sp_Public_Call( " & vbCrLf
                cmdSqlCommand.CommandText &= "@ParamFields VarChar(max) = Null, " & vbCrLf
                cmdSqlCommand.CommandText &= "@ParamTable VarChar(max) = Null, " & vbCrLf
 
                cmdSqlCommand.CommandText &= "@ParamOrderBy VarChar(max) = Null) " & vbCrLf
                cmdSqlCommand.CommandText &= " WITH ENCRYPTION" & vbCrLf
                cmdSqlCommand.CommandText &= " AS" & vbCrLf
                cmdSqlCommand.CommandText &= " BEGIN " & vbCrLf
                cmdSqlCommand.CommandText &= "    DECLARE @strSQL VarChar(max) " & vbCrLf
 
                cmdSqlCommand.CommandText &= "       SET @strSQL = 'SELECT ParamFields FROM ParamTable ORDER BY ParamOrderBy'" & vbCrLf
                cmdSqlCommand.CommandText &= "       SET @strSQL = REPLACE(@strSQL,'ParamFields',@ParamFields)" & vbCrLf
                cmdSqlCommand.CommandText &= "       SET @strSQL = REPLACE(@strSQL,'ParamTable',@ParamTable)" & vbCrLf
                cmdSqlCommand.CommandText &= "       SET @strSQL = REPLACE(@strSQL,'ParamOrderBy',@ParamOrderBy)" & vbCrLf
              
                cmdSqlCommand.CommandText &= "    EXEC (@strSQL)" & vbCrLf
 
                cmdSqlCommand.CommandText &= " END"
 
                Try
                    cmdSqlCommand.ExecuteNonQuery()
                Catch ex As Exception
                    MsgBox(ex.Message)
                    MsgBox("Cannot continue!" & vbCrLf & vbCrLf & "Failed to create the stored procedure.")
 
                End Try
 
            End Using
 
        End Using
 
    End Sub
[+][-]07.04.2008 at 09:08AM PDT, ID: 21933771

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 09:16AM PDT, ID: 21933814

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 10:17AM PDT, ID: 21934049

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 10:18AM PDT, ID: 21934054

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 10:30AM PDT, ID: 21934104

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 10:34AM PDT, ID: 21934124

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 10:35AM PDT, ID: 21934128

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 10:43AM PDT, ID: 21934159

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 10:45AM PDT, ID: 21934168

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 01:19PM PDT, ID: 21934733

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, SQL Server 2005
Tags: Microsoft, Visual Basic, Visual Basic 2005
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.04.2008 at 07:08PM PDT, ID: 21935536

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.05.2008 at 03:10AM PDT, ID: 21936499

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.05.2008 at 07:42AM PDT, ID: 21937216

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.05.2008 at 07:49AM PDT, ID: 21937241

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.05.2008 at 08:02AM PDT, ID: 21937279

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.06.2008 at 05:26AM PDT, ID: 21940033

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.06.2008 at 06:42AM PDT, ID: 21940281

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.06.2008 at 06:53AM PDT, ID: 21940349

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.06.2008 at 07:10AM PDT, ID: 21940391

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.06.2008 at 07:19AM PDT, ID: 21940415

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.06.2008 at 07:29AM PDT, ID: 21940443

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080924-EE-VQP-38 / EE_QW_2_20070628