Click here to Skip to main content
15,905,914 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: JS: Pass object by reference to a method Pin
minhpc_bk5-Jul-05 0:30
minhpc_bk5-Jul-05 0:30 
GeneralRe: JS: Pass object by reference to a method Pin
Stan Angeloff5-Jul-05 0:47
Stan Angeloff5-Jul-05 0:47 
GeneralRe: JS: Pass object by reference to a method Pin
Guffa5-Jul-05 3:26
Guffa5-Jul-05 3:26 
GeneralRe: JS: Pass object by reference to a method Pin
Stan Angeloff5-Jul-05 1:10
Stan Angeloff5-Jul-05 1:10 
GeneralTextbox control Pin
Milanhuisman4-Jul-05 7:34
Milanhuisman4-Jul-05 7:34 
GeneralRe: Textbox control Pin
Guffa4-Jul-05 8:10
Guffa4-Jul-05 8:10 
GeneralRe: Textbox control Pin
Milanhuisman5-Jul-05 9:13
Milanhuisman5-Jul-05 9:13 
Generalerror message after hitting upload button Pin
Member 20927834-Jul-05 2:00
Member 20927834-Jul-05 2:00 
hi sir,
i'm getting the following error after hitting the upload button:
***********************************************************
Response object error 'ASP 0185 : 80020003'

Missing Default Property

?

A default property was not found for the object.
****************************************************
i'm sending all three files regarding this problem kindly help me out..
*********************************************************
file1:clsupload.asp

Class clsUpload
'========================================================='
' This class will parse the binary contents of the '
' request, and populate the Form and Files collections. '
'========================================================='
Private m_objFiles
Private m_objForm

Public Property Get Form()
Set Form = m_objForm
End Property

Public Property Get Files()
Set Files = m_objFiles
End Property

Private Sub Class_Initialize()
Set m_objFiles = New clsCollection
Set m_objForm = New clsCollection
ParseRequest
End Sub

Private Sub ParseRequest()
Dim lngTotalBytes, lngPosBeg, lngPosEnd, lngPosBoundary, lngPosTmp, lngPosFileName
Dim strBRequest, strBBoundary, strBContent
Dim strName, strFileName, strContentType, strValue, strTemp
Dim objFile

'Grab the entire contents of the Request as a Byte string
lngTotalBytes = Request.TotalBytes
strBRequest = Request.BinaryRead(lngTotalBytes)

'Find the first Boundary
lngPosBeg = 1
lngPosEnd = InStrB(lngPosBeg, strBRequest, UStr2Bstr(Chr(13)))
If lngPosEnd > 0 Then
strBBoundary = MidB(strBRequest, lngPosBeg, lngPosEnd - lngPosBeg)
lngPosBoundary = InStrB(1, strBRequest, strBBoundary)
End If
If strBBoundary = "" Then
'The form must have been submitted *without* ENCTYPE="multipart/form-data"
'But since we already called Request.BinaryRead, we can no longer access
'the Request.Form collection, so we need to parse the request and populate
'our own form collection.
lngPosBeg = 1
lngPosEnd = InStrB(lngPosBeg, strBRequest, UStr2BStr("&"))
Do While lngPosBeg < LenB(strBRequest)
'Parse the element and add it to the collection
strTemp = BStr2UStr(MidB(strBRequest, lngPosBeg, lngPosEnd - lngPosBeg))
lngPosTmp = InStr(1, strTemp, "=")
strName = URLDecode(Left(strTemp, lngPosTmp - 1))
strValue = URLDecode(Right(strTemp, Len(strTemp) - lngPosTmp))
m_objForm.Add strName, strValue
'Find the next element
lngPosBeg = lngPosEnd + 1
lngPosEnd = InStrB(lngPosBeg, strBRequest, UStr2BStr("&"))
If lngPosEnd = 0 Then lngPosEnd = LenB(strBRequest) + 1
Loop
Else
'The form was submitted with ENCTYPE="multipart/form-data"
'Loop through all the boundaries, and parse them into either the
'Form or Files collections.
Do Until (lngPosBoundary = InStrB(strBRequest, strBBoundary & UStr2Bstr("--")))
'Get the element name
lngPosTmp = InStrB(lngPosBoundary, strBRequest, UStr2BStr("Content-Disposition"))
lngPosTmp = InStrB(lngPosTmp, strBRequest, UStr2BStr("name="))
lngPosBeg = lngPosTmp + 6
lngPosEnd = InStrB(lngPosBeg, strBRequest, UStr2BStr(Chr(34)))
strName = BStr2UStr(MidB(strBRequest, lngPosBeg, lngPosEnd - lngPosBeg))
'Look for an element named 'filename'
lngPosFileName = InStrB(lngPosBoundary, strBRequest, UStr2BStr("filename="))
'If found, we have a file, otherwise it is a normal form element
If lngPosFileName <> 0 And lngPosFileName < InStrB(lngPosEnd, strBRequest, strBBoundary) Then 'It is a file
'Get the FileName
lngPosBeg = lngPosFileName + 10
lngPosEnd = InStrB(lngPosBeg, strBRequest, UStr2BStr(chr(34)))
strFileName = BStr2UStr(MidB(strBRequest, lngPosBeg, lngPosEnd - lngPosBeg))
'Get the ContentType
lngPosTmp = InStrB(lngPosEnd, strBRequest, UStr2BStr("Content-Type:"))
lngPosBeg = lngPosTmp + 14
lngPosEnd = InstrB(lngPosBeg, strBRequest, UStr2BStr(chr(13)))
strContentType = BStr2UStr(MidB(strBRequest, lngPosBeg, lngPosEnd - lngPosBeg))
'Get the Content
lngPosBeg = lngPosEnd + 4
lngPosEnd = InStrB(lngPosBeg, strBRequest, strBBoundary) - 2
strBContent = MidB(strBRequest, lngPosBeg, lngPosEnd - lngPosBeg)
If strFileName <> "" And strBContent <> "" Then
'Create the File object, and add it to the Files collection
Set objFile = New clsFile
objFile.Name = strName
objFile.FileName = Right(strFileName, Len(strFileName) - InStrRev(strFileName, "\"))
objFile.ContentType = strContentType
objFile.Blob = strBContent
m_objFiles.Add strName, objFile
End If
Else 'It is a form element
'Get the value of the form element
lngPosTmp = InStrB(lngPosTmp, strBRequest, UStr2BStr(chr(13)))
lngPosBeg = lngPosTmp + 4
lngPosEnd = InStrB(lngPosBeg, strBRequest, strBBoundary) - 2
strValue = BStr2UStr(MidB(strBRequest, lngPosBeg, lngPosEnd - lngPosBeg))
'Add the element to the collection
m_objForm.Add strName, strValue
End If
'Move to Next Element
lngPosBoundary = InStrB(lngPosBoundary + LenB(strBBoundary), strBRequest, strBBoundary)
Loop
End If
End Sub

Private Function BStr2UStr(BStr)
'Byte string to Unicode string conversion
Dim lngLoop
BStr2UStr = ""
For lngLoop = 1 to LenB(BStr)
BStr2UStr = BStr2UStr & Chr(AscB(MidB(BStr,lngLoop,1)))
Next
End Function

Private Function UStr2Bstr(UStr)
'Unicode string to Byte string conversion
Dim lngLoop
Dim strChar
UStr2Bstr = ""
For lngLoop = 1 to Len(UStr)
strChar = Mid(UStr, lngLoop, 1)
UStr2Bstr = UStr2Bstr & ChrB(AscB(strChar))
Next
End Function

Private Function URLDecode(Expression)
'Why doesn't ASP provide this functionality for us?
Dim strSource, strTemp, strResult
Dim lngPos
strSource = Replace(Expression, "+", " ")
For lngPos = 1 To Len(strSource)
strTemp = Mid(strSource, lngPos, 1)
If strTemp = "%" Then
If lngPos + 2 < Len(strSource) Then
strResult = strResult & Chr(CInt("&H" & Mid(strSource, lngPos + 1, 2)))
lngPos = lngPos + 2
End If
Else
strResult = strResult & strTemp
End If
Next
URLDecode = strResult
End Function

End Class

Class clsCollection
'========================================================='
' This class is a pseudo-collection. It is not a real '
' collection, because there is no way that I am aware '
' of to implement an enumerator to support the '
' For..Each syntax using VBScript classes. '
'========================================================='
Private m_objDicItems

Private Sub Class_Initialize()
Set m_objDicItems = Server.CreateObject("Scripting.Dictionary")
m_objDicItems.CompareMode = vbTextCompare
End Sub

Public Property Get Count()
Count = m_objDicItems.Count
End Property

Public Default Function Item(Index)
Dim arrItems
If IsNumeric(Index) Then
arrItems = m_objDicItems.Items
If IsObject(arrItems(Index)) Then
Set Item = arrItems(Index)
Else
Item = arrItems(Index)
End If
Else
If m_objDicItems.Exists(Index) Then
If IsObject(m_objDicItems.Item(Index)) Then
Set Item = m_objDicItems.Item(Index)
Else
Item = m_objDicItems.Item(Index)
End If
End If
End If
End Function

Public Function Key(Index)
Dim arrKeys
If IsNumeric(Index) Then
arrKeys = m_objDicItems.Keys
Key = arrKeys(Index)
End If
End Function

Public Sub Add(Name, Value)
If m_objDicItems.Exists(Name) Then
m_objDicItems.Item(Name) = Value
Else
m_objDicItems.Add Name, Value
End If
End Sub
End Class

Class clsFile
'========================================================='
' This class is used as a container for a file sent via '
' an http multipart/form-data post. '
'========================================================='
Private m_strName
Private m_strContentType
Private m_strFileName
Private m_Blob

Public Property Get Name() : Name = m_strName : End Property
Public Property Let Name(vIn) : m_strName = vIn : End Property
Public Property Get ContentType() : ContentType = m_strContentType : End Property
Public Property Let ContentType(vIn) : m_strContentType = vIn : End Property
Public Property Get FileName() : FileName = m_strFileName : End Property
Public Property Let FileName(vIn) : m_strFileName = vIn : End Property
Public Property Get Blob() : Blob = m_Blob : End Property
Public Property Let Blob(vIn) : m_Blob = vIn : End Property

Public Sub Save(Path)
Dim objFSO, objFSOFile
Dim lngLoop
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Response.Write(objfso)
Set objFSOFile = objFSO.CreateTextFile(objFSO.BuildPath(Path, m_strFileName))
For lngLoop = 1 to LenB(m_Blob)
objFSOFile.Write Chr(AscB(MidB(m_Blob, lngLoop, 1)))
Next
objFSOFile.Close
End Sub
End Class

************************************************************
***********************************************************
file2:system_config.asp

<%@ Language=VBScript %>


<%
call OpenDataCon
if Request.QueryString("MOVE")="NEXT" then

if (cstr(trim(Session("CurrentPage")))=cstr(trim(request("pgcount")))) then
Session("CurrentPage")=Session("CurrentPage")
else
Session("CurrentPage")=Session("CurrentPage")+1
end if
end if

if Request.QueryString("MOVE")="PREV" then
Session("CurrentPage")=Session("CurrentPage")-1
end if

if Request.QueryString("MOVE")="" then
Session("CurrentPage")=1
end if

%>



<%

Dim objUpload, lngLoop,mTemplate
'If Request.TotalBytes > 0 Then
Set objUpload = New clsUpload
dim msno
msno=0
set rst=Server.CreateObject("ADODB.recordset")
rst.CursorLocation=3
if Request.QueryString ("chkadd")="1" then
strcnt="select count(sno) as cnt from system_config"
rst.Open strcnt, mycon
cnt=cint(rst("cnt"))
rst.Close()
if cnt=0 then
msno=1
else
mysql="select max(sno) as msno from system_config"
rst.Open mysql, mycon
msno=cint(rst("msno"))
msno=msno+1
'rst.Close()
end if


dim ii,iii,iiii,iiiii,KK
ii=ret_date(objUpload.Form.Item("txtfrdt"))
if ii<>null then
ii="'"+cstr(datevalue(ii))+"'"
end if
iii=ret_date(objUpload.Form.Item("txttodt"))
if iii<>null then
iii="'"+cstr(datevalue(iii))+"'"
end if
iiii=ret_date(objUpload.Form.Item("txtwrdt"))
if iiii<>null then
iiii="'"+cstr(datevalue(iiii))+"'"
end if
iiiii=ret_date(objUpload.Form.Item("txtprnwrdt"))
if iiiii<>null then
iiiii="'"+cstr(datevalue(iiiii))+"'"
end if
if KK<>null then
KK=ret_date(objUpload.Form.Item("txtscnwrdt"))
KK="'"+cstr(datevalue(KK))+"'"
end if

'call MyUpload()
'objUpload.Form.Item("seluname")
'Response.Write(ii)
'Response.End
mysql="insert into System_Config (sno,user_name,fr_date,to_date,Room_no,Computer_brand,Model,Serial_no,ProcessTyp_Spd,HDD_capacity,RAM,Monitor_Typ,Monitor_Sno,Keyboard,Keyboard_sno,Mouse,Mouse_sno,CDROM_DVD,CDROM_sno,CDWriter_combo,CDWriter_sno,Warranty_Exp_dt,Syst_Confg_Html,Printer_brand,Printer_type,Printer_model,Printer_sno,Printer_Warranty_Exp_Dt, "&_
" Scanner_brand,Scanner_type,Scanner_model,Scanner_sno) " &_
" values("&msno&",'"+objUpload.Form.Item("seluname")+"',"+ii+","+iii+",'"+objUpload.Form.Item("txtrmno")+"','"+objUpload.Form.Item("selcompbrand")+"','"+objUpload.Form.Item("txtmodel")+"','"+objUpload.Form.Item("txtsrno")+"', " &_
" '"+objUpload.Form.Item("selprocessor")+"','"+objUpload.Form.Item("selhdd")+"','"+objUpload.Form.Item("selram")+"','"+objUpload.Form.Item("selmonitor")+"','"+objUpload.Form.Item("txtmsrno")+"','"+objUpload.Form.Item("selkeyb")+"','"+objUpload.Form.Item("txtkeybsno")+"','"+objUpload.Form.Item("selmouse")+"','"+objUpload.Form.Item("txtmousesno")+"'," &_
" '"+objUpload.Form.Item("txtcdrom")+"','"+objUpload.Form.Item("txtcdrsno")+"','"+objUpload.Form.Item("txtcdwr")+"','"+objUpload.Form.Item("txtcdwsno")+"',"+iiii+",'"+objUpload.Form.Item("txtFilename1")+"'," &_
" '"+objUpload.Form.Item("selprinterbrand")+"','"+objUpload.Form.Item("selprn_typ")+"','"+objUpload.Form.Item("txtprnmodel")+"','"+objUpload.Form.Item("txtprnsno")+"',"+iiiii+", " &_
" '"+objUpload.Form.Item("selsacnnerbrand")+"','"+objUpload.Form.Item("selscan_typ")+"','"+objUpload.Form.Item("txtscnmodel")+"','"+objUpload.Form.Item("txtscnsno")+"' )"
Response.Write(mysql)
Response.End
mycon.execute mysql
Response.Redirect("system_config.asp")
end if

'*****************************************************
'mysql="select max(sno) as sno from system_config"
'Response.Write sno
'Response.End
'rst.Open mysql, mycon
mysql="select * from system_config order by sno"
'Response.Write mysql
'Response.End
rst.Open mysql, mycon
dim Cnt
if not rst.EOF then
Cnt=rst.RecordCount
'Response.Write Cnt
'Response.End
rst.PageSize=5
rst.AbsolutePage=Session("CurrentPage")
end if
ii=ret_date(objUpload.Form.Item("txtfrdt"))
if ii<>null then
ii="'"+cstr(datevalue(ii))+"'"
end if
iii=ret_date(objUpload.Form.Item("txttodt"))
if iii<>null then
iii="'"+cstr(datevalue(iii))+"'"
end if
iiii=ret_date(objUpload.Form.Item("txtwrdt"))
if iiii<>null then
iiii="'"+cstr(datevalue(iiii))+"'"
end if
iiiii=ret_date(objUpload.Form.Item("txtprnwrdt"))
if iiiii<>null then
iiiii="'"+cstr(datevalue(iiiii))+"'"
end if
if KK<>null then
KK=ret_date(objUpload.Form.Item("txtscnwrdt"))
KK="'"+cstr(datevalue(KK))+"'"
end if
'rst.Close
'******************************update******************
dim sqlmod
if Request.QueryString("chkupdt")=1 then



ii=ret_date(objUpload.Form.Item("txtfrdt"))
if ii<>null then
ii="'"+cstr(datevalue(ii))+"'"
end if

call MyUpload()

sqlmod="update system_config set user_name='"+objUpload.Form.Item("seluname")+"',fr_date="+ii+",to_date="+iii+",Room_no='"+objUpload.Form.Item("txtrmno")+"',computer_brand='"+objUpload.Form.Item("selcompbrand")+"'," &_
"Model='"+objUpload.Form.Item("txtmodel")+"',Serial_no='"+objUpload.Form.Item("txtsrno")+"',ProcessTyp_Spd='"+objUpload.Form.Item("selprocessor")+"',HDD_capacity='"+objUpload.Form.Item("selhdd")+"',RAM='"+objUpload.Form.Item("selram")+"'," &_
"Monitor_Typ='"+objUpload.Form.Item("selmonitor")+"',Monitor_sno='"+objUpload.Form.Item("txtmsrno")+"',Keyboard='"+objUpload.Form.Item("selkeyb")+"',Keyboard_sno='"+objUpload.Form.Item("txtkeybsno")+"',Mouse='"+objUpload.Form.Item("selmouse")+"',mouse_sno='"+objUpload.Form.Item("txtmousesno")+"'," &_
"CDROM_DVD='"+objUpload.Form.Item("txtcdrom")+"',CDROM_sno='"+objUpload.Form.Item("txtcdrsno")+"',CDWriter_combo='"+objUpload.Form.Item("txtcdwr")+"',CDWriter_sno='"+objUpload.Form.Item("txtcdwsno")+"',Warranty_Exp_dt="+iiii+",Syst_Confg_Html='"+objUpload.Form.Item("txtFilename1")+"' ," &_
"Printer_brand= '"+objUpload.Form.Item("selprinterbrand")+"',Printer_type= '"+objUpload.Form.Item("selprn_typ")+"',Printer_model= '"+objUpload.Form.Item("txtprnmodel")+"',Printer_sno= '"+objUpload.Form.Item("txtprnsno")+"',Printer_Warranty_Exp_Dt="+objUpload.Form.Item("txtprnwrdt")+", " &_
"Scanner_brand= '"+objUpload.Form.Item("selsacnnerbrand")+"',Scanner_type= '"+objUpload.Form.Item("selscan_typ")+"',Scanner_model= '"+objUpload.Form.Item("txtscnmodel")+"',Scanner_sno= '"+objUpload.Form.Item("txtscnsno")+"' " &_
" where sno="&objUpload.Form.Item("chkbox")&""
Response.Write(sqlmod)
Response.End
mycon.execute sqlmod
Response.Redirect("system_Config.asp")
end if
'*************************************Delete************************
if Request.QueryString("chkdel")=1 then
dim a()
i=1
redim a(10)
for each value in Request.QueryString("chkbox")
if value <> "" then
if i >10 then redim preserve a(20)
a(i)=value
end if
i=i+1
next


if i > 1 then
for j=1 to i-1
sqldelete="delete from system_config where sno =" & a(j) & " "
Response.Write sqldelete
Response.End
MyCon.Execute sqldelete
next
end if

Response.Redirect("system_config.asp")
end if






%>



<title>System Configuration








Home


System Configuration




<% set rst1=Server.CreateObject("ADODB.recordset")
rst1.CursorLocation=3
strcnt1="select count(sno) as cnt from system_config"
'Response.Write strcnt1
'Response.End
'Response.Write (cnt)
'Response.End
rst1.Open strcnt1, mycon

cnt=cint(rst1("cnt"))
'Response.Write (cnt)
'Response.End
'rst.Close()
%>
">











<%
dim strcnt1,mysql1,msno1
msno1=0
set rst1=Server.CreateObject("ADODB.recordset")
rst1.CursorLocation=3
'if Request.QueryString ("chkadd")="1" then
strcnt1="select count(sno) as cnt from system_config"
'Response.Write cnt
'Response.End
rst1.Open strcnt1, mycon
cnt=cint(rst1("cnt"))
rst1.Close()
if cnt=0 then
msno1=1
else
mysql1="select max(sno) as msno1 from system_config"

rst1.Open mysql1, mycon
msno1=cint(rst1("msno1"))
' while 1=1
'Response.Write msno1
'Response.End
'rst.Close()
%>

 

<%
msno1=msno1+1
'wend
end if

%>











User Name :  
<%set rstuser=server.CreateObject("ADODB.recordset")
rstuser.CursorLocation=3
mysql="select name from usr_sys_mast order by name"
rstuser.Open mysql,mycon%>

-
<%while not rstuser.EOF%>
<%=rstuser(0)%>
<%rstuser.MoveNext%>
<%wend%>
<%rstuser.Close()%>
Room No :  
From Date :  

MM-DD-YYYY
To Date :  

 MM-DD-YYYY
Brand :  
<%set rstcmpbr=Server.CreateObject("ADODB.Recordset")
rstcmpbr.CursorLocation=3
mysql="select brand_name from Hardwarebrand order by brand_name"
rstcmpbr.Open mysql, mycon%>

-
<%while not rstcmpbr.EOF%>
<%=rstcmpbr(0)%>
<%rstcmpbr.MoveNext%>
<%wend%>
<%rstcmpbr.Close()%>
Model/Type :  
Computer S/N :  
Processor Type & Speed :  
<%set rstpro=server.CreateObject("ADODB.recordset")
rstpro.CursorLocation=3
str="select process_name from Processor_master order by process_name"
rstpro.Open str,mycon%>

-
<%while not rstpro.EOF%>
><%=rstpro.Fields(0)%>
<%rstpro.MoveNext%>
<%wend%>
<%rstpro.Close()%>
HDD Capacity :  
<%set rsthdd=Server.CreateObject("ADODB.recordset")
rsthdd.CursorLocation=3
str="select hdd_name from hdd_master order by hdd_name "
rsthdd.Open str,mycon%>

-
<%while not rsthdd.EOF%>
><%=rsthdd.Fields(0)%>
<%rsthdd.MoveNext%>
<%wend%>
<%rsthdd.Close()%>
RAM :  
<%set rstram=Server.CreateObject("ADODB.recordset")
rstram.CursorLocation=3
str="select Ram_name from RAM_Master order by Ram_name"
rstram.Open str,mycon%>

-
<%while not rstram.EOF%>
><%=rstram.Fields(0)%>
<%rstram.MoveNext%>
<%wend%>
<%rstram.Close()%>
Monitor Type :  
<%
set rstmonitor=Server.CreateObject("ADODB.recordset")
rstmonitor.CursorLocation=3
str="select mon_name from monitor_master order by mon_name"
rstmonitor.Open str,mycon%>

-
<%while not rstmonitor.EOF %>
><%=rstmonitor.Fields(0)%>
<%rstmonitor.MoveNext%>
<%wend%>
<%rstmonitor.Close()%>

Monitor S/N :  
Keyboard :  
<%
set rstk=server.CreateObject("ADODB.recordset")
rstk.cursorlocation=3
str="select keyb_name from keyboard_master order by keyb_name"
rstk.open str,mycon
%>

-
<%while not rstk.eof%>
><%=rstk.fields(0)%>
<%rstk.movenext%>
<%wend%>
<%rstk.close()%>
Keyboard S/N :  
Mouse Type :  
<%set rstmouse=server.CreateObject("ADODB.recordset")
rstmouse.CursorLocation =3
str="select mous_name from mouse_master order by mous_name"
rstmouse.open str,mycon %>

-
<%while not rstmouse.eof%>
><%=rstmouse.fields(0)%>
<%rstmouse.movenext%>
<%wend%>
<%rstmouse.close()%>

Mouse S/N :  
CD ROM/DVD :    CD ROM/DVD S/N :   
CD Writer/Combo :    CD Writer/Combo S/N :   
Warranty Expiry Date :   
 MM-DD-YYYY
System Configuration Html file :
                                              Upload File1 DownLoad
File1
Printer Brand :  
<%set rstcmpprinter=Server.CreateObject("ADODB.Recordset")
rstcmpprinter.CursorLocation=3
mysql="select brand_name from Printer_Master order by brand_name"
rstcmpprinter.Open mysql, mycon%>

-
<%while not rstcmpprinter.EOF%>
<%=rstcmpprinter(0)%>
<%rstcmpprinter.MoveNext%>
<%wend%>
<%rstcmpprinter.Close()%>
Printer Type :  
<%
set rstprn_typ=Server.CreateObject("ADODB.recordset")
rstprn_typ.CursorLocation=3
str="select Prn_name from Printer_Type order by Prn_name"
rstprn_typ.Open str,mycon%>

-
<%while not rstprn_typ.EOF %>
><%=rstprn_typ.Fields(0)%>
<%rstprn_typ.MoveNext%>
<%wend%>
<%rstprn_typ.Close()%>
Printer Model :  
Printer S/N :  
Printer Warranty Expiry Date :   
 MM-DD-YYYY
Scanner Brand :  
<%set rstcmpsacnner=Server.CreateObject("ADODB.Recordset")
rstcmpsacnner.CursorLocation=3
mysql="select brand_name from Scanner_Master order by brand_name"
rstcmpsacnner.Open mysql, mycon%>

-
<%while not rstcmpsacnner.EOF%>
<%=rstcmpsacnner(0)%>
<%rstcmpsacnner.MoveNext%>
<%wend%>
<%rstcmpsacnner.Close()%>
Scanner Type :  
<%
set rstsacn_typ=Server.CreateObject("ADODB.recordset")
rstsacn_typ.CursorLocation=3
str="select Scn_name from Scanner_Type order by Scn_name"
rstsacn_typ.Open str,mycon%>

-
<%while not rstsacn_typ.EOF %>
><%=rstsacn_typ.Fields(0)%>
<%rstsacn_typ.MoveNext%>
<%wend%>
<%rstsacn_typ.Close()%>
Scanner Model :  
Scanner S/N :  
Scanner Warranty Expiry Date :   
 MM-DD-YYYY




<%NumRows=0
while not rst.EOF and NumRows < rst.PageSize%>
">
<%rst.MoveNext
NumRows=NumRows+1
wend
'rst.Close()%>
Select User Name Room No Computer Brand Monitor Type Keyboard Mouse
> <%=rst("user_name")%> <%=rst("Room_no")%> <%=rst("Computer_brand")%> <%=rst("Monitor_typ")%> <%=rst("Keyboard")%> <%=rst("Mouse")%>

<%if Session("CurrentPage") >1 then%>
[PREV]
<%end if%>
<%if Session("CurrentPage")< rst.PageCount then %>
[NEXT]
<%end if%>



<%
Function FixNull(mvar)
if isnull(mvar) then FixNull="" else Fixnull=mvar
end function
%>
<%
Function setnull(str)
If (IsEmpty(str) Or str = " ") Then setnull = Null Else setnull = str
End Function
dim ret_str,ret_numb
function ret_date(mdate)
if mdate<>"" then
ret_date="datevalue(cstr('"+mdate+"'))"
else
ret_date="null"
end if
end function
%>
************************************************************
file3: FileUpload1.asp
****************************************************
<%@ Language=VBScript %>


<%
'sr_no=request("sr_no")
mtype = request("mtype")
fileno = request("fileno")
'Response.Write(request("fileno"))
'Response.End()%>




<title>Uploading Files


Close  





Files Uploading Screen


>

Please select the file to be uploaded:





    





<%

Dim objUpload, lngLoop

If Request.TotalBytes > 0 Then
Set objUpload = New clsUpload

%>

File(s) Uploaded: <%= objUpload.Files.Count %>




<%
'Response.Write(objUpload.Filename)
For lngLoop = 0 to objUpload.Files.Count - 1
'If accessing this page annonymously,
'the internet guest account must have
'write permission to the path below.
' objUpload.Files.Item(lngLoop).Save "e:\data\"
if mtype = "MR" then
objUpload.Files.Item(lngLoop).Save (server.MapPath("MR"))
elseif mtype = "PR" then
objUpload.Files.Item(lngLoop).Save (server.MapPath("PR"))
elseif mtype = "PhotoGal" then
objUpload.Files.Item(lngLoop).Save (server.MapPath("PHOTOGAL"))
else
objUpload.Files.Item(lngLoop).Save (server.MapPath("CV"))
end if
Next
End If
%>






************************************************************
thanks and regards
pankaj.
GeneralRe: error message after hitting upload button Pin
J4amieC4-Jul-05 2:56
J4amieC4-Jul-05 2:56 
GeneralRe: error message after hitting upload button Pin
Guffa4-Jul-05 3:27
Guffa4-Jul-05 3:27 
General&quot;no-touch deployment&quot; loads always old winform version Pin
Member 15117663-Jul-05 21:42
Member 15117663-Jul-05 21:42 
GeneralRe: &quot;no-touch deployment&quot; loads always old winform version Pin
minhpc_bk4-Jul-05 18:13
minhpc_bk4-Jul-05 18:13 
GeneralRe: &quot;no-touch deployment&quot; loads always old winform version Pin
Member 15117664-Jul-05 20:44
Member 15117664-Jul-05 20:44 
GeneralRe: &quot;no-touch deployment&quot; loads always old winform version Pin
minhpc_bk4-Jul-05 21:44
minhpc_bk4-Jul-05 21:44 
GeneralDownload and install Problem Pin
vinodraut3-Jul-05 18:45
vinodraut3-Jul-05 18:45 
GeneralRe: Download and install Problem Pin
Christian Graus3-Jul-05 18:47
protectorChristian Graus3-Jul-05 18:47 
GeneralRe: Download and install Problem Pin
vinodraut3-Jul-05 18:55
vinodraut3-Jul-05 18:55 
GeneralRe: Download and install Problem Pin
Christian Graus3-Jul-05 18:58
protectorChristian Graus3-Jul-05 18:58 
GeneralRe: Download and install Problem Pin
vinodraut3-Jul-05 20:31
vinodraut3-Jul-05 20:31 
GeneralRe: Download and install Problem Pin
WillemM4-Jul-05 4:33
WillemM4-Jul-05 4:33 
Generalproblems with javascript Pin
cmarmr2-Jul-05 11:46
cmarmr2-Jul-05 11:46 
GeneralRe: problems with javascript Pin
Guffa2-Jul-05 13:47
Guffa2-Jul-05 13:47 
GeneralRe: problems with javascript Pin
cmarmr3-Jul-05 11:53
cmarmr3-Jul-05 11:53 
GeneralRe: problems with javascript Pin
Guffa3-Jul-05 12:31
Guffa3-Jul-05 12:31 
Generalh Pin
Anonymous1-Jul-05 8:18
Anonymous1-Jul-05 8:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.