i want to read from database and write to a text f

Results 1 to 2 of 2

Thread: i want to read from database and write to a text f

  1. #1
    Seenu Guest

    Default i want to read from database and write to a text f

    *<BR>ADODB.Recordset error &#039 800a0bb9&#039 <BR><BR>The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. <BR><BR>/kpscripts/dbasetoascii.asp, line 37 the below line<BR><BR>stroutput =objrs.GetString(adClipString, -1 , vbTab, vbCrLf)<BR><BR><BR>&#060;%@ Language=VBScript %&#062;<BR> &#060;HTML&#062;<BR> &#060;HEAD&#062;<BR> &#060;META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"&#062;<BR> &#060;/HEAD&#062;<BR> &#060;BODY&#062;<BR> <BR> <BR> &#060;%<BR> Dim strPath<BR> strPath = "C:Inetpubdnppv\"<BR> strFile="customer_get.txt"<BR> <BR> Dim objFile,objFileText,stroutput,objrs,objconn,objfs, strsql<BR> Set objfs = server.CreateObject("Scripting.FileSystemObject")< BR> Set objconn = server.CreateObject("ADODB.Connection")<BR> Set objrs = server.CreateObject("ADODB.Recordset")<BR> objconn.Open "desktopUser"<BR> strsql = "select * from Users"<BR> <BR> objrs.Open strsql, objconn, 3<BR> <BR> set objrs = OBJConn.Execute(strsql) <BR> <BR> If objrs.BOF And objrs.EOF Then<BR> ConvertToFile = False<BR> End If<BR><BR><BR> stroutput =objrs.GetString(adClipString, -1 , vbTab, vbCrLf)<BR> <BR> Set objFileText = objfs.CreateTextFile(strPath & strFile)<BR> Set objFileText = objfs.OpenTextFile(strPath & strFile, 1, False)<BR> Set objFileText = objfs.OpenTextFile(strPath & strFile, 2, False)<BR> &#039 The false attribute is to set if the file can be overwritten or not.<BR> &#039 Default Value Is False<BR><BR> objFileText.Close &#039close the file<BR> <BR> Set objFile = Nothing<BR> objrs.Close<BR> Set objrs = Nothing<BR> ConvertToFile = True<BR><BR> %&#062;<BR> &#060;/body&#062;<BR> &#060;/html&#062;<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: i want to read from database and write to a te

    don&#039t do this<BR><BR>objrs.Open strsql, objconn, 3<BR>set objrs = OBJConn.Execute(strsql) <BR><BR>Just use one or the other (in this case, the execute call) since both operations do essentially the same thing (return a recordset from a command)<BR><BR>jason

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts