<%@LANGUAGE=JScript CODEPAGE=1252 %> Add/Edit Contact <% var bNewItem = false var ProductID = new Number( Request.QueryString("Val") ) var ProductName = Request.Form( "ProductName" ) var RecordAction = Request.Form( "RecordAction" ) var rsProductData if ( -1 == ProductID ) bNewItem = true g_DBConn = GetDBConnection( Application("SOLUTIONS3") ) if ( String( RecordAction ) != "undefined" ) { try { var ProductID = Request.Form("ProductID") var Query = "SEP_SetProductData " + ProductID + ",'" + ProductName + "'" var rsResults = g_DBConn.Execute( Query ) //g_DBConn.close() Response.Write("") var ProductID = new Number( rsResults("ProductID") ) bNewItem=false //trick it into thinking that there is a new record } catch ( err ) { Response.Write( "Could not execute SEP_SetProductData(...)
" ) Response.Write( "Query: " + Query + "
" ) Response.Write( "[" + err.number + "] " + err.description ) Response.End } } else RecordAction = 0 //Response.Write("Record Action: " + RecordAction +"
" ) if ( String(ProductID) != "undefined" && bNewItem == false ) { if ( ProductID != 0 ) { try { rsProductData = g_DBConn.Execute( "SEP_GetProductData " + ProductID ) ProductName = new String( rsProductData("ProductName") ) g_DBConn.Close() } catch ( err ) { Response.Write( "Could not execute SEP_GetProductData(...)
" ) Response.Write( "[" + err.number + "] " + err.description ) Response.End } } else bNewItem=true } else bNewItem=true //if bNewTemplate is true then create a new template if ( bNewItem ) { ProductName = "New Product" ProductID=-1 } %>
>

Edit/Add Product Information

Product
Product Name