473,804 Members | 3,549 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DBI: Is there an "unbind" method?

BeemerBiker
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;");
  12.  
Feb 26 '09 #1
1 2745
KevinADC
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

24
6755
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 economy/tourist class objects be? :)
1
2420
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 the event. This also forces me to implement event handlers, which is fine for the Frame since...
2
1480
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 emptying the table with "DELETE FROM TempTable". Is there another method of doing it that might...
3
1976
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 = myDBDataSet;
4
6542
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 behind page (aspx.vb) have the following:
2
2786
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
29
560
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 the best way?And how long would it take before I can develop applications using python?Can you...
12
11423
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 cart. Now what i want is that i need to send some extra values as a parameters so that i can...
5
13388
matheussousuke
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 website URL before the image URL.
0
10580
Oralloy
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9157
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7621
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6854
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5652
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
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
3
2993
bsmnconsultancy
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.