Get data from SQL database

Hello

I'm stil trying to get some basic information stored in a database on my SQL Server table.

I can do this by incorporating an Applescript script perform the command shell "curl" like below:

myFullScriptString = "shell script \"curl-0 localhost/asset.php?asset_id="+assetID+"\"";""

myForceError = app.doScript (myFullScriptString, ScriptLanguage.APPLESCRIPT_LANGUAGE);

Return (myForceError);

but I don't want to be limited to OSX.

Is there a way that this can be put in a native socket comment using a structure like below?

response = "";

Conn = new Socket();

Conn.Open ("192.168.91.184:8888");

Conn.Write ("" GET myfile.php? "') + variousVariable + "HTTP/1.0\n\n");

response = conn.read (999999);

Conn.Close;

See you soon

Roy

conn.write(" GET /getassetstatus.php?enc=10.1.1.234~38~11~13446~PASSWORD");

I do not know what is the 'GET', and the code that I used as base had "HTTP/1.0\n\n" at the end of the url.

With all my tests, the response variable is always empty.

You need the HTTP/1.0\n\n ! Why did you take it? Check the spec, Protocol http://www.ietf.org/rfc/rfc2616.txt.

You also have a space left that seems wrong. So:

conn.write("GET /getassetstatus.php?enc=10.1.1.234~38~11~13446~PASSWORD HTTP/1.0\n\n")

Tags: InDesign

Similar Questions

  • How to get data from a database table and insert into a file

    Hello
    I'm new to soa, I want to create an xml with the data from database tables, I'll have the xsd please suggest me how to get the data in the tables and insert in a file
    concerning

    in your bpel process, you can use the db adapter to communicate with the database.
    with this type of adapter, you can use stored procedures, selects, etc to get the data from your database into your bpel workflow.

    When did it call in your bpel to the db adapter process it will return an output_variable with the contents of your table data, represented in a style of xml form.

    After that, you can use the second card (a file synchronization adapter) to write to the content of this variable in output to the file system

  • Get data from SQL Server to a different server

    Before I dive into that, I want to do this is possible and relatively painless :)

    My Flex web application is hosted on a server (let's call it server01) which is the web server, and I have a database of SQL Server 2000 on another server (server05), that is not a web server. In the Flex application, I want to fill a ComboBox with data from a table in SQL Server to server05. Is it possible even if they are on different servers and server05 has web access? Thank you.

    "Guddie" wrote in message
    News:gf1ukm$T0M$1@forums. Macromedia.com...
    > Before I dive into that, I want to make sure that it is possible and relatively
    > painless :)
    >
    > My Flex web app is hosted on a server (let's call it server01) which is the
    > web
    > server and I have a database of SQL Server 2000 on a different server
    > (server05).
    > is not a web server. In the Flex application, I want to fill a
    > ComboBox
    > using data from a table in SQL Server to server05. Is it still possible
    > If
    > they are on different servers and server05 has web access? Thank you.

    If dad server01 access server05, then it can make calls for you.

    HTH;

    Amy

  • Can I import data from a database in a FrameMaker using ExtendScript document?

    I want to import the part of database information in a structured document in FrameMaker (XML). The document would be an illustrated parts catalog, built by merging the text in the document structured with Bill of material stored in a database and graphic files. ExtendScript for this, or do I have to study a different language for this programmatic approach to the construction of a document?

    There is no direct way to connect to a database with FrameMaker ExtendScript. It is possible to write code C++ to interact with scripts, so you could write some kind of connector in C++ that would work with ExtendScript. ExtendScript can work with XML files, then another solution is to export the data from the database in XML format and ExtendScript allows you to analyze and import it into FrameMaker.

    I'd take a serious look at FrameScript. FrameScript has built-in ODBC support, you can connect directly to your database and use SQL queries to get your data into FrameMaker. There also ActiveX is supported, so you can use ADODB technology to get data from your database. I did the import of the database in a bunch of my scripts over the years. Please let me know if you have any questions or comments. -Rick

  • undefined resutl tryng to get data from flash with php

    Hello

    I'm not a coder, but I understand the way that it work and can handle already-written script. I'm going through with a problem that I do not understand why is happening. I have a php and AS3 to get results from the database. Php works fine since I test. but demand for the Flash gives me a result "undefined". I have a text box on the flash file in which is supposed to show the results of the php. So far, this code:

    AS3:

    import flash.display.*;
    import flash.events.*;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.net.URLVariables;
    import flash.net.URLLoaderDataFormat;
    import flash.net.URLRequestMethod;
    
    
        
    // Assign a variable name for our URLVariables object
    var variables:URLVariables = new URLVariables();
    //  Build the varSend variable
    var request:URLRequest = new URLRequest();
    request.url = "ckBxSample_disp.php";
    request.method = URLRequestMethod.POST;
    request.data = variables;
    // Build the varLoader variable
    var varLoader:URLLoader = new URLLoader();
    varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
    varLoader.addEventListener(Event.COMPLETE, completeHandler);
    try
    {
        
        varLoader.load(request);
    }
    catch (error:Error)
    {
        trace("Unable to load URL");
    }
    // Handler for PHP script completion and return
          function completeHandler(event:Event):void{
           // Load the response from the PHP file
          if (event.target.data.returnBody == "") {
            output_txt.text = "No data coming through";
          } else {
            output_txt.condenseWhite = true;
            output_txt.htmlText = "" + event.target.data.returnBody;
            
          }
        
        }
    
    // Send the data to the php file
    varLoader.load(request);
    // Ready the variables for sending
    variables.requester = "phpRows";
    
    

    in php:



    If ($_POST ['applicant'] == 'phpRows') {}

    SQL connection code

    then mysql query here

    $sql = mysql_query ("SELECT blah blah blah

    then the while loop for all records, I like to shoot

    While ($Row = blah) {}

    call lines

    $id = $row ['id'];

    sending the results of th calle by flash

    $body = "$id";

    }

    Flash results

    Print "returnBody = $body";

    Close con

    mysql_close();

    Exit();

    }

    It is most of the code and I get a result that is not defined in the text box in flash

    can anyone help? Please

    Thanks in advance

    PHP is badly formatted.  use:

    <>

    I have remove the requirement to show the result of the database

    application of Flash

    ($_POST ['applicant'] == 'phpRows');

    Connect to the databese

    include_once 'connect_to_mysql.php '.

    $tbl_name = 'table_name ';

    $body = "";

    $con = mysql_connect ($mysql_hostname, $mysql_user, $mysql_password)

    or die ("Opps Fail to connect to the host");

    @mysql_select_db ($mysql_database, $con) or die ("Opps fail to connect to database");

    $sql = mysql_query ("SELECT * FROM $tbl_name");

    $result = mysql_query ($sql);

    While ($row = {mysql_fetch_array ($sql))}

    $id = $row ['id'];

    $uname = $row ['uname'];

    $client_song = $row ["client_song"];

    $body = "$id & $uname & $client_song;

    }

    Print $body;

    mysql_close();

    Exit();

    ?>

  • Loading data from SQL to Essbase table

    Hello

    I'm loading data from SQL to Essbase table by using a rules file. Number of rows in the source table is 7 million. I use the SUNOPSIS MEMORY ENGINE as area transit, LKM SQL for SQL and SQL IKM for Hyperion Essbase (DATA).

    Question:

    1 can I not use any other LKM as MSSQL for MSSQL (PCBS) to load data to the staging instead of LKM SQL for SQL? What I have to change the transit area then? Loading data using LKM SQL for SQL seems quite slow.

    2 it is mandatory to use LKM SQL for SQL, can someone please tell me what I can change to make this quick support parameters?

    3. is it compulsory to use the SUNOPSIS MEMORY engine loading data from SQL server to Essbase?

    Thank you...

    (1) Yes, I highly recommend watching using a KM which uses native as database technology these will usually be more efficient than the generic (like LKM SQL for SQL) KM especially when large volumes of data are involved. Your staging will change depends on where you organize data for example if you are using a SQL server specific KM as - MSSQL for MSSQL (PCBS) - you must have a lay-by available on a MSSQL database and have access to the utility of PCBS.

    (2) it is not mandatory to use this KM you can use a KMs supported by your database technology

    (3) it is absolutely not obligatory to use the SUNOPSIS MEMORY engine. This should only be used when you have relatively small amounts of data, as well as all the processes in memory, or in the case where you have no other relational technology to perform the staging on. However, in your case to use wherever you are processesing these large volumes of data you should be staged on a physical such as SQL Server or Oracle database if they are available.

  • getting data from two servers?

    Experts-

    We have two servers for the storage of the tables. 1 history 1. current server Prod

    We have same tables in the databases server.

    All the info before one month from the date of the day are stored in database tables history server
    and the rest in database tables current prod server.


    I create reports such as when the user enters a date, OBIEE must check if the date is in a month (30 days) the date today or earlier at 30 days, on this basis, it must get data from historical Server database tables / running production database server.

    How can I implement this?

    I need to create two clusters of connction (RPD records) and develop the same model twice? (One for the historical paintings and one for prod tables?)
    or can I use the technique of fragmentation? If so, can you give me an idea hwow to implement the Fragmentation of this requirement?

    Thank you for your help in advance

    You must use the fragmentation of this requirement. It is not difficult once you understand the basic principle. Nico article read here for details:

    http://gerardnico.com/wiki/dat/OBIEE/fragmentation_content

    The only non-standard bit for you will be to define the criteria of fragmentation on your sources of logical table. This is the part that says BI server to hit source.

    After return here if you get stuck.

    Paul

  • strange problem in shape after the transfer of data from sql server2000

    I successfully transferred data from sql server 2000 to oracle 10 g 2 for my forms application development...

    Now I have when I create a sample form using this data block and run I get an error something like

    1. cannot run the query... don't know why... :(

    2. when I query my table in select * from tblmaterial all values are displayed

    but

    When I run select tblmaterial matid

    He throws me an error like invalid identifier... when the column is actually present in the table...

    its really make me go nuts

    Hello
    You may be similar to this problem...

    SQL> CREATE TABLE "AMD"
      2  ("TID" NUMBER,
      3   "Tname" VARCHAR2(10),
      4   "TLOC" VARCHAR2(10));
    
    SQL> INSERT INTO "AMD"
      2  VALUES (1,'TEST','L1');
    
    SQL> SELECT * FROM "AMD";
    
           TID Tname      TLOC
    ---------- ---------- ----------
             1 TEST       L1
    
    SQL> SELECT Tname
      2  FROM "AMD";
    SELECT Tname
           *
    ERROR at line 1:
    ORA-00904: "TNAME": invalid identifier
    
    SQL> SELECT "Tname"
      2  FROM "AMD";
    
    Tname
    ----------
    TEST
    
    SQL> 
    

    If so, while creating the table remove the double quotes in column names and the name of the table.

    -Clément

  • How to get data from excel

    Hello world

    How can I get data from excel inside my program? I'm using labview 8.2. I have tried to find the solution for this but seems that the solutions are not suitable. Can someone help me? Thank you.

    Hi jieah,

    Inside of the attachment nijams don't you see this?

    read_excel_values. LLB

  • Y510 unable to get data from the camera.

    Hello

    I have a Y510 with Windows Vista 32 bit, 3 GB RAM, only 5 weeks. I get this message when I try to use Veriface, "unable to get data from the camera. The camera may have been disconnected or busy. I reinstalled Vista of the State in which the laptop came, but it does not work. I also updated the bios and install other updates were available. I would appreciate any advice.

    Thank you

    Peter

    I wish it was as easy as press Fn + Esc, I looked through an another Y510 our office and managed to find a process that must be set to Auto, the process is KtmRm. This process cannot be disabled, handicapped, or on a time delay, it must be AUTOMATIC.

  • Get data from a member of the region partitioned customer

    Hello

    I have a partitioned area, this region is in all 3 members, is it possible to get data from this region but only from 1 member of the customer, if so how?

    What is your definition of the region on the server? The three members have given? You set redundant copies? In addition, if the optimizeForWrite() of the service method returns false, the function will run the smallest number of nodes.

    Follow these steps:

    The redundant copies of the value = 1

    Returns true for optimizeForWrite()

    Make sure that all members contain primary buckets

    Perform function like you do above

    Barry

  • retrieve a row of data from mysql database

    Hello

    I extract data from a database.  Use of then in a Web page as <? php echo $row ['product'];? >

    However, if there is an apostrophe in 'product', he displays like a diamond with a question mark.

    Data stored in the database looks like this, 'pearls of Mary. "

    Is the problem when I have the data stored in the database or when it was recovered?

    Thanks, Dan

    This happens usually if you paste from another application like Word or Xpress directly in the database.

    To work around the problem:

    If you are still using the old mysql extension insert the line below before any other query mysql on your page:

    mysql_query("SET NAMES UTF8");

    If you uisng the new mysqli extension then use the variable of connection string (in this case $conn) as below:

    $conn-> query ("SET NAMES UTF8");

  • Get data from a dBASE - .dbf.

    Hello everyone - Hello work Sunday: (.) I need to get data from legacy applications that run the dbase program. You'll need to auto data. If you have an idea, please tell me. Thanks to you, NIC.

    >

    Hello everyone - Hello work Sunday: (.)

    I do not work yet--it's sad that :)

    I need to get the data from the old application
    running the program dbase. You'll need to auto data. If you have an idea, please
    say to me.

    Have a look here http://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:711825134415.

    It worked for me, with a bit of difficulty – mainly because of my own stupidity... If you have
    no problem, post back.

    HTH,

    Paul...

    Thanks to you, NIC.

  • How can I get data from each associated XMLnode in movieclips separated when you click a line in the combobox

    How can I get data from each associated XMLnode in movieclips separated when you click a line in the combobox?

    A sample of XML is like this:

    <>planter

    < Lauvtre >

    < Botanisk_navn > Acer campestre < / Botanisk_navn >

    < Norsk_navn > Naverlonn < / Norsk_navn >

    Gronn < Farge > < / fan >

    H4 < Herdighet > < / Herdighet >

    < Hoyde > 10-15 m < / Hoyde >

    < / Lauvtre >

    I have a combobox where it shows the botanical name and the Norwegian name. But the rest of the info in movieclips seem separate.

    Someone has an idea how to do this? Can I use the trace function maybe? Here is my AS3 code so far:

    var loader: URLLoader = new URLLoader();

    loader.addEventListener (Event.COMPLETE, onLoaded);

    list.addEventListener (Event.CHANGE, itemChange);

    function itemChange(e:Event):void

    {

    your. Text = list.selectedItem.data;

    TB. Text = list.selectedItem.label;

    }

    var xml;

    function onLoaded(e:Event):void

    {

    XML = new XML (e.target.data);

    var it: XMLList = xml. Planter.Lauvtre;

    for (var i: uint = 0; i < il.length (); i ++)

    {

    list.addItem ({data: it.}) Farge.Text ([i]) + "\n"+ it.» Herdighet.Text ([i]) + "\n" + it. Hoyde.text ([i]),

    label: it. Botanisk_navn. Text() [i] + "\n"+ it.» Norsk_navn. Text() [i]});

    }

    }

    Loader.Load (new URLRequest ("lauvtre.xml"));

    Thank you!

    Rheus.

    I don't know what you're trying to do.  but, if you want to fill one combobox with the botanical names and when one is chosen, the other use of logins:

    var loader: URLLoader = new URLLoader();

    loader.addEventListener (Event.COMPLETE, onLoaded);

    list.addEventListener (Event.CHANGE, itemChange);

    function itemChange(e:Event):void {}

    var selectedObj:Object = a [list.selectedIndex]

    trace (selectedObj ['fan'], selectedObj ['Botanisk'], etc);

    }

    var xml;

    var a: Array = [];

    function onLoaded(e:Event):void {}

    XML = new XML (e.target.data);

    var it: XMLList = xml. Lauvtre;

    for (var i: uint = 0; i

    list.addItem({label:il[i].child('Botanisk_navn').toString()});)

    a [i] = {'Fan': it [i].child('Farge').toString (), 'Herdighet': it [i].child('Herdighet').toString (), "Hoyde": he [i].child('Hoyde').toString (), 'Botanisk':il[i].child('Botanisk_navn').toString(),'Norsk_navn':il[i].child('Norsk_navn').toString()};}

    }

    }

    Loader.Load (new URLRequest ("test.xml"));

  • copy data from one database to another

    Hello

    I want to copy data from one database to another.

    I have two patterns such as

    dev1/dev@ORCL
    DEV2/dev@DCEL


    I have same tables dev1 and dev2 (tables)
    but I have not given in dev2 (tables).
    now, I want to copy dev1 (tables) in dev2 (tables).

    You can also use the database link:

    select * from dev1.emp@orcl;
    

    What database are you connected to?
    You must create and use the links in the database for all other databases.

    For example if you are connected to the database A and to retrieve data from database B, you must create a connection of database in base B

    create database link B connect to  identified by  using 'B';
    

    Then you can retrieve data from database B with

    select * from [yourschema.]yourtable@B;
    

    This will work only for tables that are visible to the user that you used in the definition of database link.

    Published by: hm on 10.08.2011 22:15

Maybe you are looking for

  • Satellite A300-20 a - driver webcam open fail

    I try to try to solve my problem Error: failed to open driver webcam http://img442.imageshack.us/img442/5706/hsd36352.jpg

  • Windows 10 and Sierra Wireless MC8355

    I've updated a Lenovo X131e of Windows 7 pro for Windows 10 pro in July. I recently made a trip and use a wireless connection. Everything was OK. On 20 August, I noticed that a driver updated for the Sierra Wireless MC8355 has been detected when I ra

  • remove the odd spaces of the hexadecimal string

    Hello I would like to remove the odd spaces to a hexadecimal string, and the output result.  That's what the input string will look like: 01 00 04 0F FF 36 3B CC... I want the output to be: 0100 040F FF36 3BCC... I got the attached forum labview code

  • Technologically challenged but live with Techonologically Advanced Snoopers

    I am disabled/blind but were fortunate to benefit from a new computer by the Department of Rehab of St.. for the Blind.I am trying to learn how to use it and the only problem I have is a person who lives with me knows a lot more about computers than

  • Windows 7 to windows 10

    How can I check to see if my laptop is ready for windows 10