I&#039ve written a little DLL which basically takes a text file full of SQL<BR>statements and executes them server side:-<BR><BR>Public Function ExecuteSQLScript(vsFilename As String) As String<BR> Dim psLog As String<BR> Dim piFile As Integer<BR> Dim pnCount As Long<BR> Dim psSQL As String<BR><BR> Dim pconConnection As ADODB.Connection<BR><BR> On Error GoTo Error_Function<BR><BR> pnCount = 1<BR> psLog = gsOpenDBConnection(pconConnection)<BR> If psLog &#060;&#062; "" Then<BR> Exit Function<BR> End If<BR> piFile = FreeFile<BR> Open vsFilename For Input As piFile<BR> With pconConnection<BR> .BeginTrans<BR> While Not EOF(piFile)<BR> Line Input #piFile, psSQL<BR> Call .Execute(psSQL)<BR> pnCount = pnCount + 1<BR> Wend<BR> .Close<BR> End With<BR> Set pconConnection = Nothing<BR> psLog = psLog & "Upload complete " & Str(pnCount) & " records affected."<BR> ExecuteSQLScript = psLog<BR> Close (piFile)<BR>Exit Function<BR>Error_Function:<BR> On Error Resume Next<BR> psLog = psLog & Str(pnCount) & " records affected " & vbCrLf<BR> psLog = psLog & "Error occurred in ExecuteSQLScript." & Err.Description<BR>& vbCrLf<BR> If InStr(1, Err.Description, "ODBC") &#062; 0 Then<BR> psLog = psLog & "SQL = (" & psSQL & ")"<BR> psLog = psLog & vbCrLf<BR> ExecuteSQLScript = psLog<BR> End If<BR> pconConnection.RollbackTrans<BR> Close piFile<BR>End Function<BR><BR>The DLL function is being invoked by the following piece of ASP page.<BR><BR>&#060;%<BR> dim objImportAgent<BR> dim sOutput<BR><BR> set objImportAgent = CreateObject("WHASP.ImportAgent")<BR> sOutput = objImportAgent.ExecuteSQLScript<BR> Response.Write(sOutput)<BR>%&#062;<BR><BR>The problem is that the user could potentially call this page multiple times<BR>in one session. Will the reference to objImportAgent get destroyed as soon<BR>and rollback the transaction as soon as they request another page? If<BR>anyone could point me in the right direction I&#039d really appreciate it.<BR><BR>Thanks a lot for your help.<BR><BR><BR>Bryan<BR>