26

(12 replies, posted in Script)

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
var
sl:TStringList;
jDataStream: TJSONObject;
jValue_01, jValue_02, jValue_03, jValue_04: TJSONString;
jArray: TJSONArray;
i: int;
begin
      sl:=TStringList.Create;
      sl.LoadFromFile(ExtractFilePath(Application.ExeName)+'\json.txt');
      jDataStream := nil;

      jDataStream:=TJSONObject(TJSONObject.ParseJSONValue(sl.Text));
      frm_main.Memo1.Text:=sl.text;
      frm_main.Memo2.Text:=''; //clear

      if jDataStream <> nil then
       begin
            jValue_01 := TJSONString(jDataStream.GetPairByIndex(0).JsonValue);
            jValue_02 := TJSONString(jDataStream.GetPairByIndex(4).JsonValue);
            jValue_03 := TJSONString(jDataStream.GetPairByIndex(2).JsonValue);
            jValue_04 := TJSONString(jDataStream.GetPairByIndex(3).JsonValue);
            frm_main.Memo2.Lines.Add(jValue_01.Value);
            frm_main.Memo2.Lines.Add(jValue_02.Value);
            frm_main.Memo2.Lines.Add(jValue_03.Value);
            frm_main.Memo2.Lines.Add(jValue_04.Value);

     end;

      //free object
      sl.free
end;

27

(8 replies, posted in General)

how to use QRes

28

(8 replies, posted in General)

thanks..... its works but changes the resolution of screen....
can we scale any third party application like notepad.exe

29

(8 replies, posted in General)

hello friends...
how to run 800x600 resolution exe file on any Resolution screen.
few Months ago I got a Software from google that covert resolution of any exe to our required resolution but i lost it and i forgot software's name too...
can any one help....

30

(11 replies, posted in General)

Hello K245;;;
is there way to connect mvd with sql server like we mvd connected with mysql

31

(11 replies, posted in General)

please visit K245's Page

32

(2 replies, posted in General)

thanks
maybe K245 can find solution...

33

(2 replies, posted in General)

how to call this procedure on click button or on click picture

34

(21 replies, posted in General)

hello K245
please upload an example..i tried to implement code but in vain...

35

(3 replies, posted in General)

its was

If (screen.activeForm = Form1) then // If first fom1 is active
begin
          //Script fot timer
end;

36

(3 replies, posted in General)

hello friends...
i created a timer for different queries and i want to execute my queries when form1 is active...
when form2 or other forms opened. query don't run...

37

(8 replies, posted in General)

Thanks Friends... Vovka Example looks good. please send Project...

38

(8 replies, posted in General)

i need somethings like draw canvas

39

(8 replies, posted in General)

how to create chart or draw graphics to show values on Form1
for example
i have 3 water tanks with 25000 liters Capacity.... Every tank Can be Different Capacity,,,,
and current water stock stored in Database...

40

(4 replies, posted in General)

thanks but i am not asking about increm.search.... or anytypeof search....

41

(4 replies, posted in General)

hello friends...
i have a question,,,,
how to select row from tablegrid by typing test in edit1
for example if i write Asia in edit1 then software select row where asia is placed.

42

(5 replies, posted in General)

if Combobox is connected to database then you can use this script

Form1.Combobox1.dbitemid := SQLExecute('select id from mytable where id = myID');

and Second Ans

Form1.combobox1.items.add('MyItem1');
            Form1.combobox1.items.add('MyItem2');
            Form1.combobox1.items.add('MyItem3');

43

(3 replies, posted in General)

hello friends...
which version of MySQL Server is best for windows xp?
i am using MySQL 5.5 community edition and facing slow browsing of data.. from client computer and server computer too.

44

(13 replies, posted in General)

k245 wrote:
StateOne wrote:

hello k245
any new about dmitry??

I'm sorry, but I don't have any news about him. The last time we talked on Skype was in January of this year. He's online, so he's most likely alive smile

thanks K245
we need Dmitiry's presence on foram... can anyone send this message to dmitry...

45

(13 replies, posted in General)

hello k245
any new about dmitry??

46

(3 replies, posted in General)

Thanks Both of you

47

(3 replies, posted in General)

hello friends.. i am inserting system current datetime but got an error...  how to insert

SQLExecute('Insert into MyTable(Col1,Col2,DateTime) Values ("MyData1","MyData2","'+Now+'")');

48

(9 replies, posted in General)

Select  * from xyz where id = ( select max(id) from xyz)

49

(2 replies, posted in General)

hello brian.zaballa
thanks for Help.....
now working properly

50

(2 replies, posted in General)

hello friends...
here i am uploading sms sending script by selecting rows from database

procedure FormReport_SmsSendAllbtn_OnClick (Sender: TObject; var Cancel: boolean);
var
   Msg,smsNumber,smsServer1,SMS_API1,SenderName1 : string;
   sl,slParam: TStringList;
  j : integer;
   jDataStream: TJSONObject;
   jStatus, jSmsID: TJSONString;
   dt : tDateTime;
begin
for j := 0 to SQLExecute('select (id) from smsLogs')  -1 do
        begin
            if SQLExecute('Select (id) from smsLogs where id ='+inttostr(j)) then
                begin
                    smsNumber := SQLExecute('select smsNumber from smsLogs where id = '+inttostr(j)+'');
                    Msg := SQLExecute('select smsData from smsLogs where id = '+inttostr(j)+'');
                    ShowMessage(smsNumber+' '+Msg);
                    //-------------------------------------------------------
                   SMS_API1 := SQLExecute('Select SmsAPI from Extras where id = 1');
                   SenderName1 := SQLExecute('select SenderName from Extras where id = 1');//'BlackPearl';
                   slParam := TStringList.Create;
                   smsResult := HTTPPost('http://api.veevotech.com/sendsms?hash='+SMS_API1+'&receivenum='+smsNumber+'&sendernum='+SenderName1+'&textmessage='+Msg+'',slParam);
                   slParam.Free;
    //--------------------------------------------------------
                     sl:=TStringList.Create;
                     sl.Text := smsResult;
                     jDataStream := nil;

                     jDataStream:=TJSONObject(TJSONObject.ParseJSONValue(sl.Text));
                     if jDataStream <> nil then
                       begin
                            jStatus := TJSONString(jDataStream.GetPairByIndex(0).JsonValue);
                            jSmsID := TJSONString(jDataStream.GetPairByIndex(3).JsonValue);
                       end;
                       ShowMessage(jStatus.Value);
                     if (vartostr(jStatus.Value) = 'ACCEPTED') then
                     begin
                         SQLExecute('delete from smsLogs where id = '+inttostr(j)+'');
                     end
                     else ShowMessage('Status : '+vartostr(jStatus.Value));

     //-------------------------------------------------------
                end;
        end;

end;

not working... how to fix it