123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home

Source Codes

Engineering Colleges

BE Students

Training  Reports (updated)

Seminar Reports (updated

Placement Papers (updated)

Forums

   Computer Science / IT

   Electronics

   Electrical

   Mechanical

   Chemical

   Civil

   CAT / MBA

   GMAT / Foreign MBA

Latest Jobs

Engineering Jobs / Technical Jobs

Management Jobs

Sitemap

About-Us

Terms of use

Displaying  Source Code(s)  
 

 
RecSet Function

--------------------------------------------------------------------------------

Description : The RecSet Function returns a two-dimensional array representing the resultant recordset of an SQL query. There are two required arguments, connstring which must be a valid OLE database connection string and SQL which must be an SQL statement. If no records are found, RecSet returns Null.

<%
Private Function RecSet(ByVal connstring, ByVal SQL)
Const adOpenForwardOnly = 0, adOpenKeyset = 1
Const adOpenDynamic = 2, adOpenStatic = 3
Const adLockReadOnly = 1, adLockPessimistic = 2
Const adLockOptimistic = 3, adLockBatchOptimistic = 4
Const adUseServer = 2, adUseClient = 3
Dim DebugRs, Tmp

Set DebugRs = Server.CreateObject("ADODB.Recordset")
With DebugRs
.CursorType = adOpenStatic
.CursorLocation = adUseServer
.LockType = adLockReadOnly
.ActiveConnection = connstring
.Source = SQL
.Open
If .BOF Then
Tmp = Null
Else
Tmp = .GetRows()
End If
.Close
End With
Set DebugRs = Nothing
RecSet = Tmp
End Function
%>

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG