convert OleVariant to string

Hello,

Does anyone know how to convert OleVariant to a string in delphi? Can I just use:

myString:= string(myOLEVariant);

Thanks,
0
ming
9/29/2010 12:54:47 PM
embarcadero.delphi.win32 2183 articles. 0 followers. Follow

3 Replies
5460 Views

Similar Articles

[PageSpeed] 29

varToStr

<ming di> wrote in message news:291486@forums.embarcadero.com...
> Hello,
>
> Does anyone know how to convert OleVariant to a string in delphi? Can I 
> just use:
>
> myString:= string(myOLEVariant);
>
> Thanks,
0
Michael
9/29/2010 2:07:47 PM
> {quote:title=Michael Byerley wrote:}{quote}
> varToStr
> 
> <ming di> wrote in message news:291486@forums.embarcadero.com...
> > Hello,
> >
> > Does anyone know how to convert OleVariant to a string in delphi? Can I 
> > just use:
> >
> > myString:= string(myOLEVariant);
> >
> > Thanks,

Thank you, Michael.
0
ming
9/29/2010 2:58:24 PM
ming di wrote:

> Hello,
> 
> Does anyone know how to convert OleVariant to a string in delphi? Can
> I just use:
> 
> myString:= string(myOLEVariant);

A simple myString := myOleVariant should do.

-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://codenewsfast.com
http://groups.google.com
0
Peter
9/29/2010 5:58:21 PM
Reply:

Similar Artilces:

Converting Delphi for Win32 to Delphi .Net(Prism)
Hi, I am currently migrating a project from Delphi for Win32 to Delphi.net. Part of my code currently goes into a directory and pulls out a random file from this directory and loads the contents of the file for me. This code doesn't seem to work in Delphi.Net. It uses PString and a number of functions in SysUtils that don't seem to be present in Delphi.net's SysUtils file. If anyone can help me please, it would be greatly appreciated! Many thanks, Jonathan Mackey Jonathan Mackey a écrit : > I am currently migrating a project from Delphi for Win32 to &...

Best Place to get help on converting Delphi 2007 string to Delphi 2009
Where is the best place to get help on converting Delphi 2007 strings to Delphi 2009? The most common problem getting Delphi 7-Delphi 2007 components to compile seems to be caused by the new Unicode strings in Delphi 2009. It would be great if there was some place to go to get help with this. Maybe there should be a new group for String conversion where developers could ask short questions about conversion. For example: Delphi 7 - Delphi 2007 CharArrayPtr = ^CharArray; CharArray = array[0..MaxInt-1] of Char; Compiles Delphi 2009 CharArrayPtr = ^CharArray; CharArray ...

Convert a Win32 to Delphi .NET in D2006
The win32 app is a D2006 app as well. How do I convert it to be a Delphi .NET app short of recreating the forms and copy/pasting code? Is there a conversion tool in Delphi to do this? I would think with VCL .NET there would be a way to change the target project type. -- Don Gollahon Don Gollahon wrote: > The win32 app is a D2006 app as well. How do I convert it to be a > Delphi .NET app short of recreating the forms and copy/pasting code? > Is there a conversion tool in Delphi to do this? > > I would think with VCL .NET there would be a way to change the...

Converting a list of string into string
When I try the following code in Prism I get the error "Error 8 (CE15) Type mismatch, cannot assign array of System.String to System.String " ***************************************************************** var mobileNumberList :List<string> mobNumberArray :string Begin mobileNumberList.add('1234567890'); mobNumberArray := mobileNumberList.ToArray();//error here end; *************************************************************** What needs to be done to convert an array of strings to a string Venkatesh Venkatesh VT a écrit : > When I...

Convert string to string array.
Hi, We have a string array argument in datawindow object for 'IN' sql statement. Our user enter a string in a single line edit. How to convert the string to a string array for the argument of datawindow? ex. user input : 'A', 'B', 'C' => str_arr[]={'A', 'B', 'C'} dw_1.retrieve(str_arr) Thanks in advance. Take a look at the n_cst_string object in the pfc. It has a method called of_ParseToArray that does exactly what you're looking for. It's a pretty simple task to 'port' the code ...

convert octet string to string
I'm trying to use IDM 3.5.1 provision an AD environmnet with users from eDir. We wanna provision as much info as possible, but one attribute gives us headaches. This is an auxiliary attribute associated with each user in eDir that has it's syntax set to octet string. Problem is we need to provision this over to another attribute in AD that uses string as its syntax. Is thee a way through XPath or ECMA script to have the value converted during the provisioning? I've no experience with either XPath or ECMA so please be detailed in your replies. Thx -- jdoeconsu...

How to convert a String into a UTF8 String
Hello! I want to convert a normal String into a UTF8 String for example:myString = BüromyUTF8String = Büros  I dont know how to do this. In PHP you can do this with myUTF8String = utf8_encode(myString) Thank you for all hints! try this string test ="ÁÉÍÓÚ áéíóú àèìòù äëïöü Ññ €"; byte[] a= System.Text.Encoding.UTF8.GetBytes(test); string test2= System.Text.Encoding.UTF8.GetString(a);  greetingsBest Regards,Sebastián DopicoBlog Desarrollador Thank you Sebastián! If I make it like that - test2 looks the same as test.But I think my problem is solved. (Someone tol...

Delphi XE convert string character to Ansichar
Hi Is there a function for converting a character in a string (unicode) to an ansichar. I am upgrading some very old programs to XE that work with characters and their ordinal values. I have just been type casting them with ansistring or ansichar, but some characters are giving incorrect results. For example var s : string; begin s := '€'; // character is hex 80 or 128 decimal showmessage(inttostr(ord(s[1]))); showmessage(inttostr(ord(ansichar(s[1])))); The above give two different answers (I can understand the first), but not why the second gives the inc...

String to Double convertion using OleVariants [Edit]
Is there a way to change the decimal seperator when converting OleVariants from string to double? I use the XML data mapping wizard, to create a wrapper class to load an application exchange xml file. I have German regional settings, but the xml file contains language neutral data (in order the data can be loaded with different regional settings). Changing the DecimalSeperator doesn't help. How can I do that? (The GUI is suppost to display the local formats). Edited by: Markus Ja on May 3, 2009 10:50 AM Markus Ja wrote: > Is there a way to change the decimal seperator when c...

Convert UPPERCASE string to Upper-Lower Case (ie. THIS IS MY STRING -> This Is My String)
I recently had the need to convert an all capitalized string to upper/lower case, but couldn't find anything to do it in XSLT 1.0.  If it helps anyone out, I wrote the following:   Call it using: <xsl:template match="Ads">  <xsl:call-template name="ToUpperLowerCase">   <xsl:with-param name="inputString" select="YOURSTRINGHERE"/>   <xsl:with-param name="index" select="0"/>   <xsl:with-param name="loopCount" select="st...

converting string to integer, subtracting strings.
Hi,  I have a textbox into which the user will enter a number I then have button that when the user clicks, the number taken from the textbox will be subtracted by one or more(depending on the users situation) and displayed in a label.   The problem i am having at the moment is that when i attempt to do this an error comes up saying that "the operator '-' cannot be used with string or int". String Score1 = txtScore1.Text: String netScore1;   netScore1 = Score1 - 1; lblNetScore1.Text = netScore1;   I have ...

Convert Unicode string to Readable String
Novell Identity Manager 3.5.1 RedHat Linux enterprise edition. SOAP IDM driver.. When I query on an attribute "firstName" from IDM, the application returns value on that atrribute as the "English\u00c6". It looks like the string comes as a Unicode string.. I need help to reformat that value so that it can be readable for my rules in my driver.. Any help guys? Regards, M. -- love anything that talks binary! ------------------------------------------------------------------------ On Fri, 21 May 2010 08:26:01 +0000, belaie wrote: >...

Convert Object/String to a Base64 String
The function below converts a normal string to a Base64 string. This can come in pretty handy ;) public static string getBase64Encoded(string inString) { byte[] inData; char[] charArr; //System.IO.StringReader sr = new System.IO.StringReader(inString); //sr.Read(inData, 0, inString.Length); charArr = inString.ToCharArray(); inData = new byte[charArr.Length]; for(int i = 0; i < charArr.Length; i++) { inData[i] = (byte)charArr[i]; } return System.Convert.ToBase64String(inData, 0 , inData.Length); } ...

Converting from Delphi 2005 to Delphi XE5
I have developed a number of Windows applications in Delphi 2005. I recently purchased Delphi XE5. I have started by trying to compile an existing 2005 application. I am getting a 7 errors about FMXTeeEditor. [dcc32 Error] E1026 File not found: 'FMXTee.Editor.Brush.fmx' Not able to find a solution to this. Any help greatly appreciated. Did you open every form before compiling? The old forms get updated with new properties when they are opened. I would make a copy of the old project before doing any of this. maybe you have links to the older tchart files....i.e its not usi...

Type converter
I have a custom type converter on a class that is working fine on the "ToString()". I have the reverse coded into the CanConvertFrom(), but I can't seem to find a way to create the object from a String. Am I missing something here? Simply override the ConvertFrom method on your TypeConverter class. So take its input string value, process it, and have the ConvertFrom method instantiate and return an instance of your class.Hope that helps,WimWim Hollebrandse---http://www.zealandit.com         public override object ConvertFrom(ITypeDescriptorCont...

converting delphi code to delphi .NET
Hi,I'm looking at converting quite a bit of old delphi code to delphi .NET .  I'm wondering can it be converted to VB.NET for certain ?  Or perhaps there are some unsupported functions etc in delphi and I should keep the code delphi ?  There are about 10,000 lines of code.   Anyone brave enough to take an estimate on how long it would take to convert 10,000 lines ?is going from delphi to delphi.NET smooth ?   Would going to another language cause complications ?Thanks! mike123   Mike123,   Sorry I can not help, however, I have the s...

superreview requested: [Bug 245619] Don't bother converting result of scripts into a string when the caller doesn't care about the value. : [Attachment 150056] Don't convert the result to a string if
Johnny Stenback <jst@mozilla.jstenback.com> has asked Brendan Eich <brendan@mozilla.org> for superreview: Bug 245619: Don't bother converting result of scripts into a string when the caller doesn't care about the value. http://bugzilla.mozilla.org/show_bug.cgi?id=245619 Attachment 150056: Don't convert the result to a string if the caller doesn't care about the return value. http://bugzilla.mozilla.org/attachment.cgi?id=150056&action=edit ...

superreview granted: [Bug 245619] Don't bother converting result of scripts into a string when the caller doesn't care about the value. : [Attachment 150056] Don't convert the result to a string if t
Brendan Eich <brendan@mozilla.org> has granted Johnny Stenback <jst@mozilla.jstenback.com>'s request for superreview: Bug 245619: Don't bother converting result of scripts into a string when the caller doesn't care about the value. http://bugzilla.mozilla.org/show_bug.cgi?id=245619 Attachment 150056: Don't convert the result to a string if the caller doesn't care about the return value. http://bugzilla.mozilla.org/attachment.cgi?id=150056&action=edit ------- Additional Comments from Brendan Eich <brendan@mozilla.org> Duh, thanks. r+sr=me....

How to convert a non string data into string format?
as titlethis.brain=null;MSN+EMAIL: vincent90152900@gmail.com What do you mean by "as title"? To convert a non-string data type to a string, you can use either ToString, Convert.ToString, and sometimes you can cast to string.Ryan OlshanASPInsider | Microsoft MVP, ASP.NEThttp://ryanolshan.comHow to ask a question thank you. that is very helpfulthis.brain=null;MSN+EMAIL: vincent90152900@gmail.com...

Convert another C++ code convert to delphi
Hello, I need the following code convert to Delphi DWORD files_count; bool error_flag = false; bool bResult; for(DWORD i=0; i < files_count && bResult && !error_flag; i++) { if(std::find(delete_file.begin(), delete_file.end(), i)==delete_file.end()) ........ here delete_file is as std::vector<int> delete_file How to convert this loop and if condition? -- Best Regards Md. Shariful Alam Khan "Md. Shariful Alam Khan" <murad_mouri@yahoo.com> wrote in message news:36441@forums.codegear.com.....

Migrate from Delphi 2007 for Win32 to Delphi XE
we use Delphi 2007 for Win32 to support legacy (32Bit) OWL-based pascal applications (yes i know it was a mistake not to switch to VCL 15 years ago). could our applications still be opened and compiled with Delphi XE? The existing projects are all plain Pascal-Code, coming back from the times of Turbo Pascal for Windows and later on Borland Pascal. Are there any improvements we could profit from (i.e IDE, Debugger)? Thanks Andrej > {quote:title=Andrej Dimic wrote:}{quote} > could our applications still be opened and compiled with Delphi XE? I'm not sure, but I guess ...

delphi Win32 using delphi .NET dll
Hi, I'm trying to use a delphi.NET dll in delphi.WIN32. I am currently using CodeGear Delphi 2007 with version2(base version) of .NET I can get the dll to import into the WIN32 application the only problem is when i include things such as: "using Classes,DateUtils, SysUtils" in the .NET dll the win32 application will instantly hang when any of the dll functions are called. Any help would be great thanks. Also I have tried this example and it also crashes for me? http://cc.embarcadero.com/Item/22688 -Braden I also found this.. "The problem is that, wehn you instal...

Convert Delphi 7 to Delphi 2009 [Edit]
Hi! Please, I have a code done in Delphi 7... Now I want to convert Delphi 7 to Delphi 2009 but I'm having problems when compile the code. Error message: +[DCC Fatal Error] Far.dpr(9): F2063 Could not compile used unit 'System.pas'+ Please can somebody help me? Source Download (349KB): http://rapidshare.com/files/256191328/FileManager.rar.html Mirror Source Download: http://www.megaupload.com/?d=12GYLPT0 Password: delphi Thank u so much! (sorry for my bad english, it is not my native language) Edited by: loquax loquax on Jul 15, 2009 12:24 PM Sorry, bu...

Varchar2 datatype converts to string instead of String
Hi, I am evaluating PD 8 (version 8.0.0.203). When I reverse engineer Oracle database (version 8.1.5) into PD, it generated Varchar2 datatype as "string" instead of "String". This creates problem when I generate Java classes. Does anyone know any fix for this? TIA, Rahul Could you be a bit more specific on the steps after you RE'd the tables into a PDM? I assume that you generated the PDM to an OOM, and that's where you saw the "string" instead of "String". -- Michael F. Nicewarner [TeamSybase] mailto:psyclo@datamod...

Web resources about - convert OleVariant to string - embarcadero.delphi.win32

Free Pascal - Wikipedia, the free encyclopedia
2.6.4 / March 11, 2014 ; 45 days ago ( 2014-03-11 ) ) is a free Pascal and Object Pascal compiler . In addition to its own Object Pascal dialect, ...

Reference for unit 'System': Procedures and functions
[ Overview ][ Constants ][ Types ][ Classes ][Procedures and functions][ Variables ][ Index ] Reference for unit 'System' ( #rtl ) Reference ...

Reference for unit 'System': Types
[ Overview ][ Constants ][Types][ Classes ][ Procedures and functions ][ Variables ][ Index ] Reference for unit 'System' ( #rtl ) Reference ...

Resources last updated: 2/25/2016 1:11:37 PM