Einzelnen Beitrag anzeigen

noisy_master

Registriert seit: 17. Jun 2009
Ort: Wolfenbüttel/Baddeckenstedt
255 Beiträge
 
Delphi XE5 Professional
 
#21

AW: TMS Webcore app mit DB auf gehosteten Systemen

  Alt 29. Nov 2022, 17:05
Hi TigerLilly,

super, tolle hilfe, funktioniert bei mir aber leider nicht:
alles noch lokal
im Browser: http://localhost/api.php/records/customers
ergibt
{"records":[{"id":1,"company":"Company A","last_name":"Bedecs","first_name":"Anna","email _address":null,"job_title":"Owner","business_phone ":"(123)555-0100","home_phone":null,"mobile_phone":null,"fax_n umber":"(123)555-0101","address":"123 1st Street","city":"Seattle","state_province":"WA","zi p_postal_code":"99999","country_region":"USA","web _page":null,"notes":null,"attachments":""},{"id":2 ,"company":"Company B","last_name":"Gratacos Solsona","first_name":"Antonio","email_address":nu ll,"job_title":"Owner","business_phone":"(123)555-0100","home_phone":null,"mobile_phone":null,"fax_n umber":"(123)555-0101","address":"123 2nd Street","city":"Boston","state_province":"MA","zip _postal_code":"99999","country_region":"USA","web_ page":null,"notes":null,"attachments":""},{"id":3, "company":"Company C".....
Das Ganze mit
Rest Explorer 1.2 auf http://localhost/api.php/records/customers versucht...liefert auch Ergebnisse

dann in Delphi:
Delphi-Quellcode:
object Form1: TForm1
  Width = 1096
  Height = 681
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  FormContainer = 'appcontent'
  ParentFont = False
  OnCreate = WebFormCreate
  object WebLabel1: TWebLabel
    Left = 24
    Top = 40
    Width = 180
    Height = 16
    Caption = 'Click on column headers to sort'
    ElementID = 'description'
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = 'Tahoma'
    Font.Style = []
    HeightPercent = 100.000000000000000000
    ParentFont = False
    WidthPercent = 100.000000000000000000
  end
  object WebLabel2: TWebLabel
    Left = 24
    Top = 8
    Width = 62
    Height = 13
    Caption = 'DBGrid Demo'
    ElementID = 'title'
    HeightPercent = 100.000000000000000000
    WidthPercent = 100.000000000000000000
  end
  object WebDBGrid1: TWebDBGrid
    Left = 24
    Top = 59
    Width = 1049
    Height = 470
    Columns = <
      item
        DataField = 'Company'
        Title = 'Company'
      end>
    DefaultRowHeight = 80
    DataSource = WebDataSource1
    FixedCols = 0
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = 'Tahoma'
    Font.Style = []
    Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goRowSelect]
    ParentFont = False
    TabOrder = 0
    HeightPercent = 100.000000000000000000
    WidthPercent = 100.000000000000000000
    OnFixedCellClick = WebDBGrid1FixedCellClick
    ColWidths = (
      64)
    RowHeights = (
      80
      80
      80
      80
      80)
  end
  object WebClientConnection1: TWebClientConnection
    Active = True
    URI = 'localhost/api.php/records/customers/'
    Left = 464
    Top = 544
  end
  object WebDataSource1: TWebDataSource
    DataSet = WebClientDataSet1
    Left = 624
    Top = 552
  end
  object WebClientDataSet1: TWebClientDataSet
    Connection = WebClientConnection1
    Params = <>
    Left = 256
    Top = 552
    object WebClientDataSet1Brand: TStringField
      FieldName = 'Company'
      Size = 256
    end
  end
end
liefert mir
ERROR
Error connecting to URI localhost/api.php/records/customers/ | fMessage::Error connecting to URI localhost/api.php/records/customers/ FJSError::Error: Error connecting to URI localhost/api.php/records/customers/ fHelpContext::0
at http://localhost:8000/TMSWeb_DBGrid/TMSWeb_DBGrid.js [259:48]
auf
http://localhost:8000/TMSWeb_DBGrid/index.html

und die gleiche Fehlermeldung bekomme ich auch schon, wenn ich ich mir im Designer auf WebClientDataset die Felder holen will...

Bin ich zu doof, oder was ist hier los?
Dirk
  Mit Zitat antworten Zitat