Hi All,
I have a VB script which should read the data from sql server and store in variable and it has delete the data from file based on the varaible value.
Example if we got variable as 4 then we need to delete 4-1=3 first 3records from file.
Here is the script which i devloped but getting error.
'Sample code for Connecting to SQL SERVER Data Base & Fetch the Data from Data Base
<!--[if !supportEmptyParas]--> <!--[endif]-->
Str_Connect = "Provider=SQLOLEDB;Data Source=WVDMD043;Initial Catalog=tempdb"
<!--[if !supportEmptyParas]--> <!--[endif]-->
Set CnnSQL=CreateObject("ADODB.Connection")
CnnSQL.Open Str_Connect, "test", "test123"
<!--[if !supportEmptyParas]--> <!--[endif]-->
If CnnSQL.State=1 Then
Msgbox "Connected"
else
Msgbox "Not Connected"
End If
<!--[if !supportEmptyParas]--> <!--[endif]-->
Set Rs=CreateObject("ADODB.Recordset")
Set Rs=CnnSQL.Execute("select userid from ##axpert_global")
Do while not Rs.EOF
Msgbox (Rs(0) & space(3) & Rs(1) & space(3) & Rs(2) & space(3) & Rs(3))
Rs.MoveNext
Loop
<!--[if !supportEmptyParas]--> <!--[endif]-->
end
__________
Appreciate your quick reply