NEWS ENTRY FORM
Name
Type
StartDate
EndDate
Broucher
<% set o = new clsUpload if o.Exists("cmdSubmit") then 'declare the variables Dim Connection Dim ConnectionString Dim Recordset Dim SQL sFileSplit = split(o.FileNameOf("txtFile"), "\") sFile = sFileSplit(Ubound(sFileSplit)) o.FileInputName = "txtFile" o.FileFullPath = Server.MapPath(".") & "\" & sFile o.save if o.Error = "" then 'response.write "Success. File saved " else 'response.write "Failed due to the following error: " end if 'define the connection string, specify database driver ConnString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=luther.ebiz4.com; DATABASE=heart-t_robhs; " &_ "UID=heart-t_robhs;PASSWORD=balaji; OPTION=3" 'create an instance of the ADO connection and recordset objects Set Connection = Server.CreateObject("ADODB.Connection") s1=o.valueOf("na") s2=o.valueOf("ty") s5=o.valueOf("sd") s6=o.valueOf ("ed") 'Open the connection to the database Connection.Open ConnString SQL="insert into events_news(name,type,sdate,edate,broucher) values('"&s1&"','"&s2&"','"&s5&"','"&s6&"','"&sFile&"')" Connection.execute SQL Connection.Close Set Connection=nothing Set o = nothing end if %>