Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Delphi
  4. dbx.sql in an unrecognized command type error

dbx.sql in an unrecognized command type error

Scheduled Pinned Locked Moved Delphi
databasequestiondelphisql-serversysadmin
8 Posts 3 Posters 40 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11718731
    wrote on last edited by
    #1

    Hi All! I created a testing project in which on server side there is SQLConnection component with MSSQL driver. I am using data snap server components to make it as server application. On client side i dropped one SQLConnection with data snap driver, also I dropped TSqlQuery on the client side, and execute a query on the db of the client side that is connected with the server one. but this operation gave me an error "dbx.sql in an unrecognized command type" Please note: TSqlQuery is connected to SQLConnection which is available in client side, which is using datasnap driver to connect to server applicatkon. I am using Delphi XE6. My objective is to Execute SQL query using TSQLQuery in the data snap client application. So how can i do that? Thanks in Advance.

    L 1 Reply Last reply
    0
    • U User 11718731

      Hi All! I created a testing project in which on server side there is SQLConnection component with MSSQL driver. I am using data snap server components to make it as server application. On client side i dropped one SQLConnection with data snap driver, also I dropped TSqlQuery on the client side, and execute a query on the db of the client side that is connected with the server one. but this operation gave me an error "dbx.sql in an unrecognized command type" Please note: TSqlQuery is connected to SQLConnection which is available in client side, which is using datasnap driver to connect to server applicatkon. I am using Delphi XE6. My objective is to Execute SQL query using TSQLQuery in the data snap client application. So how can i do that? Thanks in Advance.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Please show your code, especially the SQL statement that causes the error.

      U 1 Reply Last reply
      0
      • L Lost User

        Please show your code, especially the SQL statement that causes the error.

        U Offline
        U Offline
        User 11718731
        wrote on last edited by
        #3

        Thank you for your quick response. I have the sample project, but there is no option available to include attachment. so i explain my project here. I created server application with two units 1. MainForm 2. TDSServerModule1 On TDSServerModule1 i dropped TSQLConnection and added parameters to connect to SQL Server database "master" (using MSSQL driver) On mainform I dropped TDSServer, TDSTCPServerTransport, TDSServerClass and connected them with TDSServer. I added the following code in the OnGetClass event of the TDSServerClass PersistentClass := TDSServerModule1; Next I created client application with Only one form i dropped TSQLConnection connected to server application (using DataSnap driver) i right clicked and generated 'Client Classes' using 'Generate Datasnap Client Classes' menu i dropped TDSProviderConnection component and connected to TSQLConnection i dropped TSqlQuery component and connected to TSQLConnection. I write the following query Select * from sysdatabases when i open the query, it is throwing that error. here is my client side application code: unit Dsc01Main; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Data.DBXDataSnap, IPPeerClient, Data.DBXCommon, Data.DB, Data.SqlExpr, Dsc01ServerClasses, Datasnap.DBClient, Datasnap.DSConnect, Data.FMTBcd; type TForm1 = class(TForm) SQLConnection1: TSQLConnection; //it is using datasnap driver DSProviderConnection1: TDSProviderConnection; SQLQuery1: TSQLQuery; btOpen: TButton; procedure FormCreate(Sender: TObject); procedure SQLConnection1AfterConnect(Sender: TObject); procedure SQLConnection1BeforeDisconnect(Sender: TObject); procedure btOpenClick(Sender: TObject); private { Private declarations } FTestServerClient : TDSServerModule1Client; public { Public declarations } property TestServerClient : TDSServerModule1Client read FTestServerClient; end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.btOpenClick(Sender: TObject); begin With SQLQuery1 do begin Close; SQL.Text := 'Select * from sysdatabases'; Open; //this is throwing error end; end; procedure TForm1.FormCreate(Sender: TObject); begin SQLConnection1.Open; end; procedure TForm1.SQLConnection1AfterConnect(Sender: TObject); begin FTestServerClient := TDSServerModule1Client.Create(SQLConn

        L 1 Reply Last reply
        0
        • U User 11718731

          Thank you for your quick response. I have the sample project, but there is no option available to include attachment. so i explain my project here. I created server application with two units 1. MainForm 2. TDSServerModule1 On TDSServerModule1 i dropped TSQLConnection and added parameters to connect to SQL Server database "master" (using MSSQL driver) On mainform I dropped TDSServer, TDSTCPServerTransport, TDSServerClass and connected them with TDSServer. I added the following code in the OnGetClass event of the TDSServerClass PersistentClass := TDSServerModule1; Next I created client application with Only one form i dropped TSQLConnection connected to server application (using DataSnap driver) i right clicked and generated 'Client Classes' using 'Generate Datasnap Client Classes' menu i dropped TDSProviderConnection component and connected to TSQLConnection i dropped TSqlQuery component and connected to TSQLConnection. I write the following query Select * from sysdatabases when i open the query, it is throwing that error. here is my client side application code: unit Dsc01Main; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Data.DBXDataSnap, IPPeerClient, Data.DBXCommon, Data.DB, Data.SqlExpr, Dsc01ServerClasses, Datasnap.DBClient, Datasnap.DSConnect, Data.FMTBcd; type TForm1 = class(TForm) SQLConnection1: TSQLConnection; //it is using datasnap driver DSProviderConnection1: TDSProviderConnection; SQLQuery1: TSQLQuery; btOpen: TButton; procedure FormCreate(Sender: TObject); procedure SQLConnection1AfterConnect(Sender: TObject); procedure SQLConnection1BeforeDisconnect(Sender: TObject); procedure btOpenClick(Sender: TObject); private { Private declarations } FTestServerClient : TDSServerModule1Client; public { Public declarations } property TestServerClient : TDSServerModule1Client read FTestServerClient; end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.btOpenClick(Sender: TObject); begin With SQLQuery1 do begin Close; SQL.Text := 'Select * from sysdatabases'; Open; //this is throwing error end; end; procedure TForm1.FormCreate(Sender: TObject); begin SQLConnection1.Open; end; procedure TForm1.SQLConnection1AfterConnect(Sender: TObject); begin FTestServerClient := TDSServerModule1Client.Create(SQLConn

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Open; //this is throwing error

          What do you expect this command to do, and what error do you see? Also please use <pre> tags around your code, so it is readable; as I have done here.

          U 2 Replies Last reply
          0
          • L Lost User

            Open; //this is throwing error

            What do you expect this command to do, and what error do you see? Also please use <pre> tags around your code, so it is readable; as I have done here.

            U Offline
            U Offline
            User 11718731
            wrote on last edited by
            #5

            I want to select all rows from table "sysdatabases" which is exist in master database. My objective is to created multi tier datasnap application. But i want to add TSqlQuery in the client application and to execute select, insert, update, and delete commands from the client application. Usually we put tsqlconnection (dbconnection) and tsqlquery on the server side, and clientdataset on the client side. But I want to use TSqlQuery on the client side of the datasnap multi tier application. Is there any way to send my sample project to you thru email. my email id is askfaridh@gmail.com

            1 Reply Last reply
            0
            • L Lost User

              Open; //this is throwing error

              What do you expect this command to do, and what error do you see? Also please use <pre> tags around your code, so it is readable; as I have done here.

              U Offline
              U Offline
              User 11718731
              wrote on last edited by
              #6

              I want to select all rows from table "sysdatabases" which is exist in master database. When i execute the Open command, it is throwing the following error "Remote error: Dbx.SQL is an unrecognized command type." My objective is to create multi tier data snap application. But i want to add TSqlQuery in the client application and to execute select, insert, update, and delete commands directly from the client application. Usually we put tsqlconnection (dbconnection) and tsqlquery on the server side, and clientdataset on the client side. But I want to use database connection on the server side, but TSqlQuery on the client side of the datasnap multi tier application. The reason behind is i created one sample application using TMS workflow studio component, when I use that component in the multi tier datasnap application it throws the same error. It seems that they are executing the query on the client side. So I want to make sure the possibility to use TSQLQuery in the client application of the multi tier datasnap application Is there any way to send my sample project to you thru email. my email id is askfaridh@gmail.com

              L 1 Reply Last reply
              0
              • U User 11718731

                I want to select all rows from table "sysdatabases" which is exist in master database. When i execute the Open command, it is throwing the following error "Remote error: Dbx.SQL is an unrecognized command type." My objective is to create multi tier data snap application. But i want to add TSqlQuery in the client application and to execute select, insert, update, and delete commands directly from the client application. Usually we put tsqlconnection (dbconnection) and tsqlquery on the server side, and clientdataset on the client side. But I want to use database connection on the server side, but TSqlQuery on the client side of the datasnap multi tier application. The reason behind is i created one sample application using TMS workflow studio component, when I use that component in the multi tier datasnap application it throws the same error. It seems that they are executing the query on the client side. So I want to make sure the possibility to use TSQLQuery in the client application of the multi tier datasnap application Is there any way to send my sample project to you thru email. my email id is askfaridh@gmail.com

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                Member 11753159 wrote:

                Is there any way to send my sample project to you thru email.

                No.

                A 1 Reply Last reply
                0
                • L Lost User

                  Member 11753159 wrote:

                  Is there any way to send my sample project to you thru email.

                  No.

                  A Offline
                  A Offline
                  adomanim
                  wrote on last edited by
                  #8

                  no , you https://kodi.software/ & https://luckypatcher.cam/ & https://nox.tips/ cant

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups