473,324 Members | 2,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

How to fix this error object of class variant could not be converted to string?

147 100+
Hi,
I don't have any idea on this error:
Object of class variant could not be converted to string.
I am facing the error in this block.Please have a look on this:
Expand|Select|Wrap|Line Numbers
  1. IF($g!="P")
  2.        {
  3.           mssql_close($dbhandle);
  4.      //*** Close & Quit ***//  
  5.      $excel_app->Application->Quit();  
  6.      $excel_app = null;  
  7.          $Workbook = null;  
  8.          $Worksheet = null; 
  9.  
  10.          if (file_exists("$uploadedfilepath"))
  11.          {
  12.              #delete
  13.              unlink($uploadedfilepath) or die ("Could not delete file"); 
  14.          }
  15.           exit("error in uploading"."  ".$idno)                       
  16.  
  17.        } 
  18.  
I don't have idea in this error. Please help me out.Thanks in advance
May 17 '11 #1
3 4277
code green
1,726 Expert 1GB
Looks like the error is in the $excel_app class
May 17 '11 #2
santhanalakshmi
147 100+
Hi,
No. I think so. Not by Excel Application

$g is a variable. (ie $g="P" ). If this condition is satisfied...i am trying to close db connection and at the same time "deleting my files".

I am facing this error, mainly from EXIT FUNCTION. I don't why?
1. Closing db connection
2. deleting my files from a directory
3. using EXIT FUNCTION - to stop script. (problem here only)

and i tried this also, if i am using only EXIT FUNCTION (Without using Closing db connection and deleting my files from a directory)means, i am not facing this error..

and i too tried this also, if i replace EXIT FUNCTION as my first step and then remaining two follows this. Then also, i am facing this error.
May 17 '11 #3
code green
1,726 Expert 1GB
This doesn't make a lot of sense without knowledge of the classes you are using.
Your first post is using Excel but in your second you talk about databases.
None of the 'errors' you have reported are php errors.
In fact they don't sound like errors at all.
What is EXIT FUNCTION?
May 18 '11 #4

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

Similar topics

3
by: Amy L. | last post by:
I have a class that contains a string array. However, I can't get this object to serialize in the xml output. Is there a trick to get a string to serialize? Thanks Amy.
4
by: Earl Teigrob | last post by:
In the exampe below, the constructor of the container class is passed the string called "foo". Within the container class, I would like to create an instance(s) of foo and add them to the ArrayList...
0
by: Roman | last post by:
I'm trying to create the form which would allow data entry to the Client table, as well as modification and deletion of existing data rows. For some reason the DataGrid part of functionality stops...
2
by: Giovanni Bassi | last post by:
Hello All, I have encountered a problem. I am using visual inheritance and my base form adds an event handler on Form Load using the AddHandler Keyword. The problem is that if the Event...
0
by: RJN | last post by:
Hi Sorry for posting again. I'm calling a shared method in the class. The following error is found in production though I'm not able to reproduce. ...
4
by: John Smith | last post by:
How can I allow someone to cast my C# class into System.String? Is it possible in C#? In C++ I used "operator" keyword to mark C++ member function.
5
by: TazaTek | last post by:
Hello, I've seen some vague references on how to do this a factory, but not in enough detail to create one, or even know if it's what I need. Essentially, I'll have one of about 5 classes that...
2
by: Bigi | last post by:
Hi, Please help, this has been driving me nuts for nearly 2 days now. This vb6 code works: Public oEng As New ebizEngine Public oMsg As ebizMessage Function EbizGetFromQueue() As String
6
by: Patient Guy | last post by:
I am a newcomer to using PHP but not to programming (C, C++, Javascript). I am playing around with classes and wanted to make a function that has a method simply for producing either plain text...
0
by: maitreyipaul | last post by:
This is my code :- The error it is throwing after I input any data in the textbox and press the submit button is :- Object reference not set to an instance of an object. The troubleshooting...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.