Imports System.Data.SqlClient
Public Class ProdA
Dim com As New SqlConnection
Dim cmd As SqlCommand
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Try
com.ConnectionString = "Data Source=" + Production.TextBox3.Text + ";Database=Database1;User Id=" + Production.TextBox1.Text + ";Password=" + Production.TextBox2.Text + ";"
com.Open()
This is the procedure i'm using build the connection with my SQL SERVER. my DB has table called STOCKS_Details whose columns are fact1/fact2/fact3/total/DATE.So to do calculations i need to pick previous row DATE into a variable on a VB application. The Problem is how can I write the Query to retrieve value to the variable..
THANK YOU