################################# use OLE; # use Win32::OLE if using the Std Distribution $Conn = CreateObject OLE "ADODB.Connection"; $Conn->Open("Provider=SQLOLEDB;Data Source=coa-iisserver2;Initial Cata +log=ETM;User Id=sa;Password=;"); $an = $Form{'Affiliate_Referrer'}; $ct = $Form{'Courtesy Title'}; $fn = $Form{'First Name'}; $ln = $Form{'Last Name'}; $ea = $Form{'Email Address'}; $wa = $Form{'Website Address'}; $cn = $Form{'Company Name'}; $ad = $Form{'Address'}; $ci = $Form{'City'}; $sp = $Form{'State/Province'}; $zc = $Form{'Zip/Postal Code'}; $co = $Form{'Country'}; $pn = $Form{'Phone Number'}; $ex = $Form{'Ext'}; $fa = $Form{'Fax'}; $re = $Form{'Reffered'}; $de = $Form{'Description'}; $ke = $Form{'Keywords'}; $Conn->Execute($sql); $RS = $Conn->Execute("SELECT * FROM affiliate where Affiliate_Number=" +.$an); if( $RS->EOF ) { &error('bad_affiliate_number'); } else { $sql="update affiliate set Affiliate_Refferals=Affiliate_Refferals+1 w +here Affiliate_Number=".$an; $Conn->Execute($sql); $sql = "INSERT INTO clients (Affiliate_Referrer,Courtesy_Title,First_N +ame,Last_Name,Email_Address,Website_Address,Address,Company_Name,City +,Postal_Code,State_Province,Country,Phone_Number,Ext,Fax,Reffered,Des +cription,Keywords) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",$an,$ct,$fn,$ln,$ea,$wa, +$cn,$ad,$ci,$sp,$zc,$co,$pn,$ex,$fa,$re,$de,$ke; $RS->Close; $Conn->Close; ##################################### } }
Edit by tye
In reply to Undescribed problem with Win32::OLE by MiRaGe 508
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |