Search Results

Search found 1589 results on 64 pages for 'calyo delphi'.

Page 3/64 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Problems upgrading MySQL application from Delphi 2006 to 2010

    - by WombaT
    I upgraded my Delphi to 2010 version and I tried to open and run application written in Delphi 2006. The app is using mysql by dbexpress with libmysql.dll and a second driver found somewhere on the Internet. I can't run it on 2010. I'm always getting "missing libmysql.dll library". I tried to get new version of it but it didn't help. Copying this library into almost all system directories didn't help. I'm out of any ideas what to do, how do I connect to database :(

    Read the article

  • dbExpress error in Delphi 2010

    - by JosephStyons
    The below code works in Delphi 2007, but it gives me this error in Delphi 2010: --------------------------- Error --------------------------- Cannot load oci.dll library (error code 127). The oci.dll library may be missing from the system path or you may have an incompatible version of the library installed. --------------------------- OK Details >> --------------------------- The exception is raised when I set "connected" to "true". I have tried placing a copy of "oci.dll" in the same folder as the .exe file, but I get the same message. I also get this message when using the form designer and a visible TSQLConnection component. Any thoughts? function TDBExpressConnector.GetConnection(username, password, servername: string) : TSQLConnection; begin //take a username, password, and server //return a connected TSQLConnection try FSqlDB := TSQLConnection.Create(nil); with FSqlDB do begin Connected := False; DriverName := 'Oracle'; GetDriverFunc := 'getSQLDriverORACLE'; KeepConnection := True; LibraryName := 'dbxora30.dll'; ConnectionName := 'OracleConnection';; Params.Clear; Params.Add('DriverName=Oracle'); Params.Add('DataBase=' + servername); Params.Add('User_Name=' + username); Params.Add('Password=' + password); Params.Add('RowsetSize=20'); Params.Add('BlobSize=-1'); Params.Add('ErrorResourceFile='); Params.Add('LocaleCode=0000'); Params.Add('Oracle TransIsolation=ReadCommited'); Params.Add('OS Authentication=False'); Params.Add('Multiple Transaction=False'); Params.Add('Trim Char=False'); Params.Add('Decimal Separator=.'); LoginPrompt := False; Connected := True; end; Result := FSqlDB; except on e:Exception do raise; end; //try-except end;

    Read the article

  • Delphi: Fast(er) widestring concatenation

    - by Ian Boyd
    i have a function who's job is to convert an ADO Recordset into html: class function RecordsetToHtml(const rs: _Recordset): WideString; And the guts of the function involves a lot of wide string concatenation: while not rs.EOF do begin Result := Result+CRLF+ '<TR>'; for i := 0 to rs.Fields.Count-1 do Result := Result+'<TD>'+VarAsString(rs.Fields[i].Value)+'</TD>'; Result := Result+'</TR>'; rs.MoveNext; end; With a few thousand results, the function takes, what any user would feel, is too long to run. The Delphi Sampling Profiler shows that 99.3% of the time is spent in widestring concatenation (@WStrCatN and @WstrCat). Can anyone think of a way to improve widestring concatenation? i don't think Delphi 5 has any kind of string builder. And Format doesn't support Unicode. And to make sure nobody tries to weasel out: pretend you are implementing the interface: IRecordsetToHtml = interface(IUnknown) function RecordsetToHtml(const rs: _Recordset): WideString; end; Update One I thought of using an IXMLDOMDocument, to build up the HTML as xml. But then i realized that the final HTML would be xhtml and not html - a subtle, but important, difference. Update Two Microsoft knowledge base article: How To Improve String Concatenation Performance

    Read the article

  • Delphi: How to avoid EIntOverflow underflow when subtracting?

    - by Ian Boyd
    Microsoft already says, in the documentation for GetTickCount, that you could never compare tick counts to check if an interval has passed. e.g.: Incorrect (pseudo-code): DWORD endTime = GetTickCount + 10000; //10 s from now ... if (GetTickCount > endTime) break; The above code is bad because it is suceptable to rollover of the tick counter. For example, assume that the clock is near the end of it's range: endTime = 0xfffffe00 + 10000 = 0x00002510; //9,488 decimal Then you perform your check: if (GetTickCount > endTime) Which is satisfied immediatly, since GetTickCount is larger than endTime: if (0xfffffe01 > 0x00002510) The solution Instead you should always subtract the two time intervals: DWORD startTime = GetTickCount; ... if (GetTickCount - startTime) > 10000 //if it's been 10 seconds break; Looking at the same math: if (GetTickCount - startTime) > 10000 if (0xfffffe01 - 0xfffffe00) > 10000 if (1 > 10000) Which is all well and good in C/C++, where the compiler behaves a certain way. But what about Delphi? But when i perform the same math in Delphi, with overflow checking on ({Q+}, {$OVERFLOWCHECKS ON}), the subtraction of the two tick counts generates an EIntOverflow exception when the TickCount rolls over: if (0x00000100 - 0xffffff00) > 10000 0x00000100 - 0xffffff00 = 0x00000200 What is the intended solution for this problem? Edit: i've tried to temporarily turn off OVERFLOWCHECKS: {$OVERFLOWCHECKS OFF}] delta = GetTickCount - startTime; {$OVERFLOWCHECKS ON} But the subtraction still throws an EIntOverflow exception. Is there a better solution, involving casts and larger intermediate variable types?

    Read the article

  • Suggestions on writing a TCP IP messaging system (Client/Server) using Delphi 2010

    - by Shane
    I would like to write a messaging system using TCP IP in Delphi 2010. I would like to hear what my best options are for using the standard delphi 2010 components/indy components for doing this. I would like to write a server which does the listening and forwarding of messages to all machines on the network running a client. 1.) a.) clients can send a message to server to be forwarded to all other clients b.) clients listen for messages from other senders (via server) and displays messages. 2.) a.) Server can send a message to all clients b.) Server forwards any messages from clients to all other clients thanks for any suggestions NOTE: I am not writing a instant messaging or chat program. This is merely a system where users can send alerts/messages to other users - they can not reply to each other! NO commercial, shareware, etc links - please! I would like to hear about how you would go about writing this type of system and what approachs you would take, and possibly the TCP IP messaging architecture you would use. Whether it be straight Winows API, Indy components, etc, etc.

    Read the article

  • Codeigniter + JQuery + Processing.js to replace a Delphi App

    - by Peter Turner
    So, I've got a mandate to make our aged trillion lined Delphi app web based and it needs to make heavy use of the <canvas> element (HTML5 compatibility doesn't seem to be a big issue since we can just make our clients use a compatible browser the way we'd make them use a compatible version of Windows in the win32 environment). The Delphi app in question is almost completely database driven and will still pretty much continue to be developed as the main product. What I am tasked with is pretty much recreating a scaled down version of the program that performs the major functions of the whole program. I couldn't find any frameworks that simulate windows forms using the canvas element, I'm assuming this is probably by design since it is easier just to use HTML, well, be that as it may, I still think it would be cool to have a few of my cool controls on the web (TRichView and TVirtualTree, etc...) So my question is, to anyone who has tried this before, A.) What can we use for an IDE to code this web app (I just use emacs, but no one else in my company does)? B.) Is it a good idea to mix PHP and Processing.JS? It seems like I'm using a lot of AJAX to get anything to happen. 3 calls just for one dialog box to pop up, Loads the HTML for the dialog, Loads the XML to populate the database info on the form Loads the processing.js PJS file which draws the database info to the canvas. Is three a lot, do people usually combine all their gets into one?

    Read the article

  • Memory concerns while plotting escape from DLL Hell in Delphi

    - by Peter Turner
    I work on a program with about 50 DLLs that are loaded from one executable, it's an old organically grown program where the only rationale for creating a new DLL is that one previously didn't exist to fill a given need. (and namespaces didn't exist in Delphi so it never crossed our mind to make dll1.main.pas, dll2.main.pas or something even more unique) What we want to do is consolidate all these DLLs into one executable, since none of them are used out of the program, there shouldn't be much of a problem. The concern my boss has is that if we did this, the memory overhead for terminal server clients would go through the roof. So, I've stepped through enough initialization code to know that lots of stuff is done every time a DLL is loaded in to memory, but say I've got a project with about 4000 files, and 50 dlls, 10 of which are probably utilized by any one user in any one session of the program. The 50 dlls are about 2/3rds form files, if not more, but beyond that there's not a lot of other resources being loaded (only a few embedded pictures, icons, cursors, etc..). If I loaded all these files in to memory, how much memory is used per unit? how much is used per class? How do I keep the overhead down? and what is the biggest project one can reasonably expect to build with Delphi? This tidbit won't help answering, but I think it might clarify what my boss is worried about, we currently start our program at about 18megs, normal working conditions are usually less than 40 megs, he thinks it could climb as high as 120 megs.

    Read the article

  • Delphi 2009 - Strip non alpha numeric from string

    - by Brad
    I've got the following code, and need to strip all non alpha numeric characters. It's not working in delphi 2009 ` unit Unit2; //Used information from // http://stackoverflow.com/questions/574603/what-is-the-fastest-way-of-stripping-non-alphanumeric-characters-from-a-string-in interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; Type TExplodeArray = Array Of String; TForm2 = class(TForm) Memo1: TMemo; ListBox1: TListBox; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } Function Explode ( Const cSeparator, vString : String ) : TExplodeArray; Function Implode ( Const cSeparator : String; Const cArray : TExplodeArray ) : String; Function StripHTML ( S : String ) : String; function allwords(data:string):integer; end; var Form2: TForm2; allword, allphrase: TExplodeArray; implementation {$R *.dfm} Function TForm2.StripHTML ( S : String ) : String; Var TagBegin, TagEnd, TagLength : Integer; Begin TagBegin := Pos ( '<', S ); // search position of first < While ( TagBegin > 0 ) Do Begin // while there is a < in S TagEnd := Pos ( '>', S ); // find the matching > TagLength := TagEnd - TagBegin + 1; Delete ( S, TagBegin, TagLength ); // delete the tag TagBegin := Pos ( '<', S ); // search for next < End; Result := S; // give the result End; Function TForm2.Implode ( Const cSeparator : String; Const cArray : TExplodeArray ) : String; Var i : Integer; Begin Result := ''; For i := 0 To Length ( cArray ) - 1 Do Begin Result := Result + cSeparator + cArray [i]; End; System.Delete ( Result, 1, Length ( cSeparator ) ); End; Function TForm2.Explode ( Const cSeparator, vString : String ) : TExplodeArray; Var i : Integer; S : String; Begin S := vString; SetLength ( Result, 0 ); i := 0; While Pos ( cSeparator, S ) 0 Do Begin SetLength ( Result, Length ( Result ) + 1 ); Result[i] := Copy ( S, 1, Pos ( cSeparator, S ) - 1 ); Inc ( i ); S := Copy ( S, Pos ( cSeparator, S ) + Length ( cSeparator ), Length ( S ) ); End; SetLength ( Result, Length ( Result ) + 1 ); Result[i] := Copy ( S, 1, Length ( S ) ); End; //Copied from JclStrings function StrKeepChars(const S: AnsiString; const Chars: TSysCharSet): AnsiString; var Source, Dest: PChar; begin SetLength(Result, Length(S)); UniqueString(Result); Source := PChar(S); Dest := PChar(Result); while (Source < nil) and (Source^ < #0) do begin if Source^ in Chars then begin Dest^ := Source^; Inc(Dest); end; Inc(Source); end; SetLength(Result, (Longint(Dest) - Longint(PChar(Result))) div SizeOf(AnsiChar)); end; function ReplaceNewlines(const AValue: string): string; var SrcPtr, DestPtr: PChar; begin SrcPtr := PChar(AValue); SetLength(Result, Length(AValue)); DestPtr := PChar(Result); while SrcPtr < {greater than less than} #0 do begin if (SrcPtr[0] = #13) and (SrcPtr[1] = #10) then begin DestPtr[0] := '\'; DestPtr[1] := 't'; Inc(SrcPtr); Inc(DestPtr); end else DestPtr[0] := SrcPtr[0]; Inc(SrcPtr); Inc(DestPtr); end; SetLength(Result, DestPtr - PChar(Result)); end; function StripNonAlphaNumeric(const AValue: string): string; var SrcPtr, DestPtr: PChar; begin SrcPtr := PChar(AValue); SetLength(Result, Length(AValue)); DestPtr := PChar(Result); while SrcPtr < #0 do begin if SrcPtr[0] in ['a'..'z', 'A'..'Z', '0'..'9'] then begin DestPtr[0] := SrcPtr[0]; Inc(DestPtr); end; Inc(SrcPtr); end; SetLength(Result, DestPtr - PChar(Result)); end; function TForm2.allwords(data:string):integer; var i:integer; begin listbox1.Items.add(data); data:= StripHTML ( data ); listbox1.Items.add(data); ////////////////////////////////////////////////////////////// data := StrKeepChars(data, ['A'..'Z', 'a'..'z', '0'..'9']); // Strips out everything data comes back blank in Delphi 2009 ////////////////////////////////////////////////////////////// listbox1.Items.add(data); data := stringreplace(data,' ',' ', [rfReplaceAll, rfIgnoreCase] ); //Replace two spaces with one. listbox1.Items.add(data); allword:= explode(' ',data); { // Converting the following PHP code to Delphi $text = ereg_replace("[^[:alnum:]]", " ", $text); while(strpos($text,' ')!==false) $text = ereg_replace(" ", " ", $text); $text=$string=strtolower($text); $text=explode(" ",$text); return count($text); } for I := 0 to Length(allword) - 1 do listbox1.Items.Add(allword[i]); end; procedure TForm2.Button1Click(Sender: TObject); begin //[^[:alnum:]] allwords(memo1.Text); end; end. ` How else would I go about doing this? Thanks

    Read the article

  • HTML Doc Tool for Delphi 2009

    - by Smasher
    Is there any free HTML creating documentation tool that fully understands Delphi 2009 features like generics and anonymous methods? I tried DelphiCodeToDoc but it crashes while parsing the source code.

    Read the article

  • Parse params from an sql query using delphi

    - by Salvador
    How i can parse and extract the parameters from an SQL Query using delphi? example : from this query SELECT * FROM MyTable WHERE Field1=:Param1 AND Field2=:Param2 AND (Field3=:Param3 OR Field4=:Param4) i want to obtain Param1 Param2 Param3 Param4 Thanks in advance.

    Read the article

  • How to disable the Formatter in Delphi 2010

    - by Gad D Lord
    Hello, The formatter in Delphi 2010 is really an annoying thing to me. I prefer formatting my code manually. I believe I do it better. How can I disable it? NOTE: Answers on why I don't use it in the first place will not be accepted. I need it switched OFF. Nothing more, nothing less. Thank you.

    Read the article

  • Looking for a good Delphi unicode string library

    - by volvox
    Any suggestion for a good unicode string library for Delphi 2010? Such thing as class that would contain a collection of independent functions, basically an encapsulation of functions that manipulate strings (ex: Trimlike, Character removal, Positional, Sub-string, Compare, Informational, Case, Replacement, Manipulation functions etc. ). Thanks

    Read the article

  • File combo box in delphi

    - by Bharat
    Hi, I want to have file combo box in delphi. It must behave like this: If i enter C:\ in combo box, it should show all the files & folders in C: Drive If i proceed further i.e., if i enter C:\Pro, then all the files & folders starting with C:\Pro should be shown in combo box. Simply it should behave like the File Name Combox Box that will come while using save dialog box

    Read the article

  • Ord function implementation in Delphi

    - by Federico Zancan
    Purely as an exercise at home, aimed to better understand some language basics, I tried to reimplement the Ord function, but I came across a problem. In fact, the existing Ord function can accept arguments of a variety of different types (AnsiChar, Char, WideChar, Enumeration, Integer, Int64) and can return Integer or Int64. I can't figure out how to declare multiple versions of the same function. How should this be coded in Delphi?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >