In VS 2008, for example I have sql command like
SELECT * FROM STUDENTS WHERE STUDENTID = @STUDENTID
Then I append value into it, for example 15
How to I catch this sql command
SELECT * FROM STUDENTS WHERE STUDENTID = 15
Thx in advance
Hello maybe this will help
I used this on VB 2005 to information for a crystal report
Dim strConnection As String = "Server=...\SQLEXPRESS; Database=db;uid=admin;Password=password" Dim Connection As New SqlConnection(strConnection) Dim norden As String norden = TextBox1.Text.ToString Dim strSQL As String = " (SELECT * FROM or_compra WHERE(or_compra.orden = " & norden & "))SELECT oc_desc.orden , oc_desc.cantidad, oc_desc.descripcion, oc_desc.importe FROM oc_desc INNER JOIN or_compra ON oc_desc.orden = or_compra.orden WHERE(oc_desc.orden =" & norden & ") " Dim DA As New SqlDataAdapter(strSQL, Connection) Dim DS As New DataSet Dim strReportName As String
As you can see the string "norden" i used it as a variable to search for an especific number and integrated it to the SQL Query you can see this in this section of the sql query
(SELECT * FROM or_compra WHERE(or_compra.orden = " & norden & "))
You can add a TextBox to the SQL Query if you need it not just a number.
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
Hi. Im using vb 2010. I want to dynamically add textboxes to my form by clicking on a button. I've google searched and so far this code worked:
Private Sub btn_addline_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_addline.Click Dim txtB1 As New TextBox Dim i For i = ...