Madhi
15 years agoContributor
ADO Connection
DBInstance = "3db60a7a-6443-45ff-8ae6-d05d0d05e007"
Set AConnection = ADO.CreateADOConnection
AConnection = .CreateADOConnection
AConnection.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog="+DBInstance+";Data Source=.\eaudit"
AConnection.LoginPrompt = False
AConnection.Open
QueryText = "SELECT count(*) FROM dbo.tablename"
Set RecSet = AConnection.Execute_(QueryText)
RecSet = AConnection.Execute_(QueryText)
Getcount = RecSet.recordcount
AConnection.Close
Im not able to get the correct record count in this. I get the anser as 1 instead of 4