Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)

Paste

Pasted as Plain Text by hdghg ( 13 years ago )
CS = ("Provider=SQLOLEDB;Data Source=YT077\SQLEXPRESS;Initial Catalog=demobase;User Id=sa;Password=1234;");
 con = new ComObject("ADODB.Connection");
 con.ConnectionString=CS;
 con.Open(CS);
 // считать из таблицы Counters значения pList и pMark
 
 CountersRead = New ComObject("ADODB.Command");
 CountersRead.ActiveConnection = con;
 CountersRead.CommandText = "SELECT * FROM COUNTERS WHERE TableName='PLIST' OR TableName='PMARK'";
 CountersRead.CommandType = 1;
 CountersWrite = New ComObject("ADODB.RecordSet");
 CountersWrite = CountersRead.Execute();
 
 while CountersWrite.EOF = 0 do
  If CountersWrite.Fields("TableName").Value="PLIST" then 
   pListIndex = CountersWrite.Fields("Counter").Value; 
  endif;
  If CountersWrite.Fields("TableName").Value="PMARK" then 
   pMarkIndex = CountersWrite.Fields("Counter").Value;
  endif;
  
  CountersWrite.MoveNext();
 enddo;

 

Revise this Paste

Parent: 58871
Your Name: Code Language: