473,554 Members | 2,169 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DBI: Is there an "unbind" method?

87 New Member
I added a temporary column to a database and want to delete it after I am finished with it. However, I cannot remove the column while it is still bound to a variable.

I tried $sth->finish() but that didnt do anything
$dbh->disconnect() works but I have to reconnect before I can remove the column. Google seems to indicate there is no unbind. The following code snippet works. Note: TestSource("NEW ") does a connect to the "new" database and assignes $dbh.

Expand|Select|Wrap|Line Numbers
  1.    TestSource("NEW");
  2.    $sth = training::RunSql($dbh, "SELECT [Employee ID],TempDept, TempPrivilege FROM EmployeeInfo;");
  3.    $sth->bind_columns(\$eid, \$dept, \$priv);
  4.    while($sth->fetch())
  5.    {
  6.     ...blah blah blah...
  7.    }
  8.    $dbh->disconnect();
  9.    TestSource("NEW");
  10.    training::RunSql($dbh,"ALTER TABLE EmployeeInfo DROP COLUMN TempDept;");
  11.    training::RunSql($dbh,"ALTER TABLE EmployeeInfo DROP COLUMN TempPrivilege;");
Feb 26 '09 #1
1 2734
4,059 Recognized Expert Specialist
The place to look is in the DBI modules documentation. Personally I don't know if there is or isn't.
Feb 26 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Hung Jung Lu | last post by:
Hi, Does anybody know where this term comes from? "First-class object" means "something passable as an argument in a function call", but I fail to see the connection with "object class" or with "first-class airplane ticket". I just find the name a bit strange. Also, if there are first-class objects, what would the second-class objects or...
by: Phil Schmidt | last post by:
I have an Entry widget inside a Frame. The Frame contains other widgets as well. I have bound the <Key> event to the Frame, but I don't want the Frame to receive the event when the Entry widget has focus. So, I bound the <Key> event to the Entry widget (bound to method a_key()). This works, except that both the Entry and Frame widgets get...
by: Randy Harris | last post by:
I am using a table to store temporary information. The application frequently empties and reloads the data in the table from a table bound to the table. The problem is, the app grows like crazy. I watched a 4MB app grow to 987MB in one session earlier. I am hoping that someone might offer a better method of doing this. Questions: I am...
by: jayderk | last post by:
Hello All, I am running in to a situation where the listbox is not refreshing for me. I am using a timer to cycle every second and call the timer_elapsed() event. in the time_elapsed event Method I have code that checks to see if a DB table has been updated.. if so the new new data is uploaded to the listbox by calling lstbox1.datasource...
by: Ryan | last post by:
Hello, I have a standard HTML button on an aspx web form that I have set to runat server. The button is named reset1 and its tag is as follows: <INPUT id="btnReset1" style="WIDTH: 60px; HEIGHT: 24px" type="reset" value="Reset" name="btnReset1" runat="server"> Using Interdev I then double click the button in design view and in the code...
by: KC | last post by:
I want to remove or "unbind" a Datatable from a datagrid. Would I say, dt.Container.Dispose() where dt is the DataTable? --- Ken
by: Gerald | last post by:
Hi ,Im a BSc4 Maths/Computer Science student.Unfortunately my curriculum did not include Python programming yet I see many vacancies for Python developers.I studied programming Pascal,C++ and Delphi.So I need to catch up quickly and master Python programming.How do you suggest that I achieve this goal?Is python platform independent?What is...
by: neovantage | last post by:
Hi, I am working on an image to process it with different ways/options given in the page. My page name is cart and it has an uploaded image having thumbnail view. When i click on that thumbnail it opens in a highfi technology thickbox. In my cart there are more than 1 images which can be process/manuplate with different options given in the...
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL http://mghospedagem.com/images/controlpanel.jpg instead of http://mghospedagem.comhttp://mghospedagem.com/images/controlpanel.jpg As u see, there's the...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.