MiRaGe 508 has asked for the wisdom of the Perl Monks concerning the following question:
################################# 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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Undescribed problem with Win32::OLE
by VSarkiss (Monsignor) on Dec 18, 2001 at 23:18 UTC | |
|
What's the problem?
by dragonchild (Archbishop) on Dec 18, 2001 at 22:50 UTC | |
|
Re: Can someone tell me what's wrong here.... it's driving me nuts ... please any help would be greatly appreciated
by runrig (Abbot) on Dec 18, 2001 at 22:50 UTC | |
|
Re: Undescribed problem with Win32::OLE
by talexb (Chancellor) on Dec 19, 2001 at 00:38 UTC | |
|
Re: Undescribed problem with Win32::OLE
by MiRaGe 508 (Novice) on Dec 19, 2001 at 01:29 UTC |