Click here to Skip to main content
15,885,842 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionWhat do i need to dim the textbox name as? Pin
RedIrishMan26-Nov-13 16:21
RedIrishMan26-Nov-13 16:21 
AnswerRe: What do i need to dim the textbox name as? Pin
RedIrishMan26-Nov-13 16:38
RedIrishMan26-Nov-13 16:38 
AnswerRe: What do i need to dim the textbox name as? Pin
Bernhard Hiller26-Nov-13 22:39
Bernhard Hiller26-Nov-13 22:39 
QuestionScroll Bar Acts Wiered Pin
DipeshTrivedi25-Nov-13 3:28
DipeshTrivedi25-Nov-13 3:28 
AnswerRe: Scroll Bar Acts Wiered Pin
Mycroft Holmes25-Nov-13 11:29
professionalMycroft Holmes25-Nov-13 11:29 
QuestionSorting using User Session Pin
Commish1323-Nov-13 14:14
professionalCommish1323-Nov-13 14:14 
AnswerRe: Sorting using User Session Pin
Bernhard Hiller24-Nov-13 20:51
Bernhard Hiller24-Nov-13 20:51 
QuestionFunction Calling 2 Different Stored Procedures Pin
Commish1322-Nov-13 6:18
professionalCommish1322-Nov-13 6:18 
I'm trying to call 2 different Stored Procedures from 1 function that I have in a separate class page. Everything is the same Connection, SearchBy, SearchVal, etc.. except the Stored Procedures are different. Is it possible to place 2 different Stored Procedure in the code like this?

Public Shared Function SearchEmpRecords_Sp(searchBy As String, searchVal As String) As DataTable

Dim con As New SqlConnection(ConfigurationManager.ConnectionStrings("strName").ConnectionString)
Dim adp As New SqlDataAdapter()
Dim cmd As New SqlCommand()
Dim cmd2 As New SqlCommand()
Dim dt As New DataTable()

Try
cmd.CommandType = CommandType.StoredProcedure

** My 2 Different Stored Procedures **
cmd.CommandText = "SearchEmpRecords_Sp"
cmd.CommandText = "SearchEmpRecords_Sp2"

cmd.Parameters.AddWithValue("@SearchBy", searchBy)
cmd.Parameters.AddWithValue("@SearchVal", searchVal)
cmd.Connection = con
adp.SelectCommand = cmd
' con.Open()
adp.Fill(dt)
Return dt
Catch ex As Exception
MsgBox(ex.Message)

Finally
adp.Dispose()
con.Close()
End Try
End Function
AnswerRe: Function Calling 2 Different Stored Procedures Pin
Richard MacCutchan22-Nov-13 7:06
mveRichard MacCutchan22-Nov-13 7:06 
GeneralRe: Function Calling 2 Different Stored Procedures Pin
Eddy Vluggen22-Nov-13 7:09
professionalEddy Vluggen22-Nov-13 7:09 
GeneralRe: Function Calling 2 Different Stored Procedures Pin
Richard MacCutchan22-Nov-13 7:33
mveRichard MacCutchan22-Nov-13 7:33 
AnswerRe: Function Calling 2 Different Stored Procedures Pin
Eddy Vluggen22-Nov-13 7:07
professionalEddy Vluggen22-Nov-13 7:07 
GeneralRe: Function Calling 2 Different Stored Procedures Pin
Commish1322-Nov-13 8:22
professionalCommish1322-Nov-13 8:22 
GeneralRe: Function Calling 2 Different Stored Procedures Pin
Eddy Vluggen26-Nov-13 11:28
professionalEddy Vluggen26-Nov-13 11:28 
Questionhow to display the size of the camera sensor in vb.net Pin
fitriadinurdin21-Nov-13 19:33
fitriadinurdin21-Nov-13 19:33 
QuestionRe: how to display the size of the camera sensor in vb.net Pin
Eddy Vluggen22-Nov-13 7:11
professionalEddy Vluggen22-Nov-13 7:11 
QuestionOverlapping with a Picturebox other controls having the picturebox transparent background VB .NET (update) Pin
jose mandurrino18-Nov-13 23:35
jose mandurrino18-Nov-13 23:35 
QuestionRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET Pin
Richard MacCutchan19-Nov-13 4:37
mveRichard MacCutchan19-Nov-13 4:37 
AnswerRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET Pin
jose mandurrino19-Nov-13 5:39
jose mandurrino19-Nov-13 5:39 
AnswerRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET (update) Pin
Eddy Vluggen19-Nov-13 10:39
professionalEddy Vluggen19-Nov-13 10:39 
GeneralRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET (update) Pin
jose mandurrino19-Nov-13 13:05
jose mandurrino19-Nov-13 13:05 
GeneralRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET (update) Pin
Eddy Vluggen20-Nov-13 7:44
professionalEddy Vluggen20-Nov-13 7:44 
AnswerRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET (update) Pin
TnTinMn19-Nov-13 13:06
TnTinMn19-Nov-13 13:06 
GeneralRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET (update) Pin
jose mandurrino19-Nov-13 21:50
jose mandurrino19-Nov-13 21:50 
GeneralRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET (update) Pin
TnTinMn21-Nov-13 13:38
TnTinMn21-Nov-13 13:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.