Results 1 to 2 of 2

Thread: help me out

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2002
    Location
    india
    Posts
    44

    help me out

    i am creating the dll for creatring the text files on the server. i want to fetch the values form the session variables and from the form and wnat to craete the text file i am using this function id DLL
    Public Function UserDocument(computercode, coursenumber, courserole1, coursename, name, strphysicalpath, value, testdate, testtime, syallbus, testval, venue, remarks) As Variant

    Dim number
    'number = 1000
    Dim fso As Variant
    Dim objFile As Variant
    Dim filename As String
    filename = strphysicalpath & "\" & value & ".htm"

    Set fso = CreateObject("Scripting.FileSystemObject")
    Set objFile = fso.CreateTextFile(filename)
    objFile.WriteLine ("Created at: " & Now)


    objFile.WriteLine "<p align='right'>" & Month(Date) & "/" & Day(Date) & "/" & Year(Date) & "</p>"

    objFile.WriteLine "<p align='center' ><font face='arial' size='3' color='black' align='center'><b>"

    objFile.WriteLine "<u>" & "Notice for" & "&nbsp; " & value & "</u></b></p></font>"
    objFile.WriteLine "<br>"
    objFile.WriteLine "<br>"
    objFile.WriteLine "<table border='0' align='center' cellpadding=0 width='90%' bordercolor='black' cellspacing='0' height='90%'>"

    objFile.WriteLine "<tr><td width='44%' height='21' align='center' >"

    objFile.WriteLine "<b ><font face='arial' size='2' align='center'> " & " Computer Code " & " </b>" & "</td><td width='44%' height='21' align='left' nowrap> " & computercode & "</font> " & "<br>"
    objFile.WriteLine "</td></tr>"
    objFile.WriteLine "<tr><td width='44%' height='21' nowrap align='center'>"

    objFile.WriteLine "<b><font face='arial' size='2' align='center'>" & "Course Name: " & " </b>" & "</td><td width='44%' height='21' align='left' nowrap> " & "" & "</font> " & "<br>"
    objFile.WriteLine "</td></tr>"
    objFile.WriteLine "<tr><td width='44%' height='21' align='center' nowrap>"

    objFile.WriteLine "<b><font face='arial' size='2' align='center'>" & "Test Date: " & " </b>" & "</td><td width='44%' height='21' align='left'nowrap>" & "" & testdate & "</font>" & "<br>"
    objFile.WriteLine "</td></tr>"
    objFile.WriteLine "<tr><td width='44%' height='21' nowrap align='center'>"

    objFile.WriteLine "<b><font face='arial' size='2' align='center'>" & "Test Time: " & " </b>" & "</td><td width='44%' height='21' align='left' nowrap>" & "" & testtime & "</font>" & "<br>"
    objFile.WriteLine "</td></tr>"
    objFile.WriteLine "<tr><td width='44%' height='21' align='center' nowrap>"


    objFile.WriteLine "<b><font face='arial' size='2' align='center'>" & "Syllabus" & "<B>" & "</td><td width='44%' height='21' align='left' nowrap>" & "" & syallbus & "</font>" & "<br>"
    objFile.WriteLine "</td></tr>"
    objFile.WriteLine "<tr><td width='44%' height='21' align='center' nowrap>"

    objFile.WriteLine "<b><font face='arial' size='2' align='center'>" & "Venue: " & " </b>" & "</td><td width='44%' height='21' align='left' nowrap>" & "" & venue & "</font>" & "<br>"
    objFile.WriteLine "</td></tr>"
    objFile.WriteLine "<tr><td width='44%' height='21' align='center' nowrap>"

    objFile.WriteLine "<b><font face='arial' size='2' align='center'>" & "Remarks :" & "</b>" & "</td><td width='44%' height='21' align='left' nowrap>" & " <font align='center'>" & "" & remarks & "</font>" & "<br>"
    objFile.WriteLine "</td></tr>"
    objFile.WriteLine "</table>"
    objFile.WriteLine

    Set objFile = Nothing
    Set fso = Nothing
    End Function
    but when i use this function in asp as
    <%set objtest=server.CreateObject("clst.clsclst")
    objtest.UserDocument(computercode)
    set objtest=nothing%>
    is is showing this error

    Microsoft VBScript runtime error '800a01c1'

    Argument not optional: 'UserDocument'

    what could vbe the reasona nd how will i fetch the values from the form and the session values to make the teaxt file using dll
    rajender

  2. #2
    Junior Member
    Join Date
    Jan 2002
    Posts
    20
    Hi

    Is it rajender who has worked in wealinfotech?

    I am parvathi. this error occurs when you are not passing all the values to the function. if u don't need to pass values to the argument declare it as optional.

    and comming to dll i didn't get what exactly u want.

Posting Permissions

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



Click Here to Expand Forum to Full Width