Jump to content

adragan

uniGUI Subscriber
  • Posts

    193
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by adragan

  1. To all tortured soles that have to fulfill the Excel dependent customer demands, I found this on the net. To my amazement , it works ! http://blog.runbits.com/post/Native-Export-XLS-without-excel-Delphi.aspx Have fun !
  2. UniDac + Firebird -> Easy to install anywhere. No maintenance for DB. Server very easy to program (sp, triggers, views, selectable stored proc. etc ) On table in excess of 10 mil, response time in index search under 2 sec. ( from the time user presses "Search" to when screen is updated) UniDac + Postgres -> Server more pretentious but has lots of usefull features. mySQL -> Not used lately because we don't know how Oracle's policy will evolve. Not checked lately but it used to have problems with concurent updates. So if it's an application that mostly reads , it's ok. If it is an ERP, WMS I would be more carefull. IBX -> Use in the past. Not reccomended ! Zeos -> Free. Has some drawbacks but is usable for budget projects. Quite fast ! FireDac -> Just started to check on them. Firebird vs Postgres Selects/updates almost the same speed. Inserts Firebird lags behind but keeps the index structure up to date which is not the case for Postgres. pgsql ->. Lots of features but does not verify properly variables . You can find yourself in the situation when after 6 months a loop discovers that a variable does not exist ! It reminds me of the Basic times ! Firebird -> Very strong programming language. Checks everything ! Not so good to signal errors ! Stupid messages ! N.B. In Firebird you have to be very careful how you handle transactions. It drives mad the mySQL programmers ! I have the "feeling" that Apache has better response time. Maybe it's just my feeling.
  3. Commit the transaction and after that reopen the query.
  4. Le me comment a little on costs : 1. Embarcadero Deplhi XE7 2000+ USD ( workable version !! ) 2. Windows Server 2012 1000+ USD 3. UniGui 500 USD 4. Server Antivirus 100 USD ( debatable !) 5. Professional Firewall ???? As compared to : 1. Lazarus 0 2. Linux server 0 3. UniGui 500 4. No need for Antivirus 5. Just configure iptables !! Multiply this on some number of serveres and any number of developers in a company and see the difference !!
  5. I had the same problems with another connection type. In the end I created the frxReport object every time I wanted to run a report and freed the object after sending the pdf to the client; Don't forget to call frxReport.Clear after frxReport.Create(nil) Don't use frxDBConnections because they are not supposed to be thread-safe. Another annoying issue is that the report closes the connection to the database every time it finishes the report. This could be solved by placing on every report a Database component and setting it's properties before running the report. This in it's turn somehow generates the "Session timeout " message in the log. With these general lines reports works most of the time.
  6. That seems to be a path problem. Did you install the run-time ? If yes , check the paths to the ext library, uni-xxxx folder , etc.
  7. Fershad, what do these errors mean : These are some lines from the application log web_crm: 00001970: 14:05:42 [192.168.100.84]:Sequence Error Timeout : pTime:16468, Evt: tabchange, Expected: 1252, Got: 1253 web_crm: 00001240: 14:05:42 [192.168.100.84]:Sequence Error Timeout : pTime:14718, Evt: click, Expected: 1252, Got: 1255 web_crm: 000013A0: 14:05:43 [192.168.100.84]:Sequence Error Timeout : pTime:15406, Evt: tabchange, Expected: 1253, Got: 1254 web_crm: 000013A0: 14:05:43 [192.168.100.84]:Failure Recovery: Sequence Recover: 1253 web_crm: 000006A0: 14:05:43 [192.168.100.84]:Failure Recovery: Sequence Recover: 1255 web_crm: 00001970: 14:05:43 [192.168.100.84]:Failure Recovery: Sequence Recover: 1254 ........................... web_crm: 00001A10: 19:10:14 [192.168.100.84]:Sequence Error Timeout : pTime:10016, Evt: itemdblclick, Expected: 3330, Got: 3331 web_crm: 00001A10: 19:10:14 [192.168.100.84]:Failure Recovery: Sequence Recover: 3330 web_crm: 00001A10: 19:10:14 [192.168.100.84]:Failure Recovery: Sequence Recover: 3331 Is it me or is it you ? Thanks
  8. adragan

    Need Solutions

    1. Work around : Use UniDBComboBox. Initial Text property empty. At Form.Show event populate the Items with selectable values. 2. UniHiddenPanel with UniDBNumberEdit linked to whatever column you want. 3 + 4. UniDBGrid.WebOptions.DefaultFloatFormat :='#,##0.00' 5. With the Date format it's a mess. UniDateTimePicker behaves eratically when date format is other than 'mm/dd/yyyy' ( American ). A date like 01.00.2015 is what you can easily see with the 'dd.mm.yyyy' format. I hope it will be fixed some time. I hope I understood correctly your questions. It was not easy !
  9. Some events to be able to save / retrieve data from a database would be helpfull.
  10. I don't think StrToFloat in that format is thread-safe. Try the other format that uses TFormatSettings which is thread-safe. The same situation for DateToStr. As a general rule it is better to use ID-s of type longint generated by the server ( autoincrement ) Best retrivel speed is achived on indexed integer fields, not on varchar. Secondary, you can put in some other field some serial no based on whatever rule you want. You shall see the differences when the database increases in size. I can't say that I understand everything you put there but the general approach is : 1. Create a separat table only with countors ( key, id ). Dont "select max(....) from ..." because it's a tricky business in multi user environments. 2. Before insert a new order , select one record from that table based on the "ORD' key for example , incremet the ID , Post it and COMMIT !. 3. Save the new number somwhere in the Datamodule or UniMainModule. 4. Generate your key acc. to your formula using that number. 5. Insert a new record in the orders table with the newly generated key. I hope I was clear enough. Salve
  11. "Key violation " si a database message. It has nothing to do with UniGui. Your tables have primary keys and you are not generating new values for each new record. If you are using Firebird you need "generators" and a trigger to generate the new ID for the new record. If you are in PostgresSQL or MsSQL the same thing is called "sequence" and you need to define the tables with serial / autoincrement fields ( like ID-s ) Depending on your data access layer you also have to define when you generate the new ID-s. For the second problem it looks like you have to red a little about transactions. Depending on a thing called "isolation level" of the transaction you can "see" or not see updates made by other clients. In very short, if you are using "read commited" isolation level and never commit after adding data, the others never see the new records. There is also a great chance that you loose the data also.
  12. adragan

    Admin Pannel

    What's the connection string for the admin pannel in case of an application running as a dll ? http://1.2.3.4://my_app.dll .............???
  13. How can we put a TUniPanel in a Column of a TUniDBGrid. Is it possible ?
  14. For a semi professional / cheap solution you can use the windows VPN. You must only configure the firewall/ router to accept VPN tunnel and route the RDP to the server you want. Even a 100$ router that can support dd-wrt can be configured to accept such connections. I think that if you are not NSA you can use such a solution. Anyway they know everything ! If i'm not mistaking, you can turn encription on in the RDP !
  15. We need more information about how to install the *.dll in apache environment. From the instructions given we can either list the hole directory and then click on the dll and run it or block the listing of the directory and then the dll "is not found". What are the "proper" parameters for the installation ? I would also like to be able to user some www.some_server/my_site and not www.some_server/my_site.dll Thanks
  16. If you want to use the Indy components then the code looks like : I don't know much about how to send it from JavaScript so I have to work with this : On a buttonClick write these : var Msg: TIdMessage; IdSMTP: TIdSMTP; TextPart: TIdText; HtmPart: TIdText; try IdSMTP := TIdSMTP.Create(nil); idSMTP.Username := < mail user name >; idSMTP.Password := < mail account password >; idSMTP.Host :=< outgoing mai server >; idSMTP.Port := < SMTP port of mail server >; Msg := TIdMessage.Create(nil); Msg.From.address := < your mail adress >; Msg.Recipients.EMailAddresses := destEdit.Text; //A TUniEdit from the form Msg.CCList.EMailAddresses := ccEdit.Text; // Same ............... Msg.BccList.EMailAddresses := bccEdit.Text; Msg.Subject := subjEdit.Text; Msg.ContentType := 'Multipart/Alternative'; Msg.ClearBody; TextPart:=TIdText.Create(Msg.MessageParts, nil); TextPart.ContentType:='text/plain'; TextPart.Body.Add(''); HtmPart := TIdText.Create(Msg.MessageParts, bodyHTMLMemo.Lines); HtmPart.ContentType := 'text/html'; try idSMTP.Connect(); idSMTP.Send(Msg); ShowMessage('Message Sent -> ok'); except on e:Exception do ShowMessage('Message Error -> '+e.message); end; finally if idSMTP.Connected then idSMTP.Disconnect(); IdSMTP.Free; TextPart.Free; HtmPart.Free; Msg.Free; end; in the Uses clause of the form you have to have : uses IdMessage, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdExplicitTLSClientServerBase, IdMessageClient, IdSMTPBase, IdSMTP, IdText, IdAttachmentFile, IdAttachment That's it ! It works;
  17. Is there a way to display ISO-8859-2 strings in a UniDBGrid string field ? How about labels etc. ? Obs. The Unicode demo does not compile on my system. Enviroment : D2006, UniGui 0.97, UniDac 4.6.12 Thanks
  18. About FastSpring I tried 3 times to pay with the card that I usually make internet payments. All 3 times came back with Reason:FRAUD. I tried to pay by my PayPal account which, what do you know, linked to the same card. PayPal didn't complain at all and finished the transaction. So send my best to FastSpring !.
  19. If you run UniGui on Windows and mySQL on some linux machine then : 1. See that MySQL has the habit of rejecting connections other than localhost. It's a setting on mySQL that allows outside access to it . It's a security feature that you have to overcome. 2. Open the 3300 ( I don't remember it exactly ) port in then firewall on the linux box 3. Install the mySQL client on the Windows machine. There are some dll's. 4. Configure access to IUSER and IIS_USER on the Windows box. They must have full access espetially on the temp directory. Sorry for being so vage but I stopped working with mySQL some time ago !
  20. You have to do a Commit or better a CommitRetaining after the insert . After that do Close and Open for then Query that displays data. Refresh does not always work. In different DB engines there are different behaviors of the Refresh. TIBQuery, TUniQuery refreshes only the current reccord. That is it gets the id for the record and refetches the data. As you are after an insert, the client does not know the id of the new record and gets nothing. The Commit/Close/Open/Last sequence refetches all the records and goes to the last one which happens to be your insert.
  21. Refresh the query behind the dbgrid !
  22. Try to maintain the price <=700 otherwise you join the Embarcadero "I know better" world of guys living in a dream. I keep developing in Delphi only for historical reasons. If it becomes too expensive ( as Embarcadero so gracioslly made the latest versions of Delphi ) then I'll have to move to someting else. I already own a Sencha license , so there must be an option about buying the whole kit or only the UniGui framework. I very much appreciate your work but please don't shoot yourself in the leg !
×
×
  • Create New...