B4J Question jrdc2 - dbresult - unknown type

vibby

Member
Licensed User
Hello,
I have compiled in the server the program jrdc2.
The system say:

Is there a reference to a library
Error line: 91 (RDCHandler)
Dim res As DBResult

Why? How library I must adding? ;(
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

vibby

Member
Licensed User
This is the code downloaded...
Main with the modules RDCConnector, RDCHandler, TestHandler.
I have added the line with the additional jar as wtite in the tutorial.

I have posted the image, and the image with the error.
I m desperate....

upload_2018-2-12_11-4-16.png


upload_2018-2-12_11-8-56.png
 

Attachments

  • upload_2018-2-12_11-3-48.png
    upload_2018-2-12_11-3-48.png
    34.7 KB · Views: 211
Upvote 0

OliverA

Expert
Licensed User
Longtime User
The program than I'm running is that download.
Something weird happened then. I saw your post but was confused, since the jRDC2.zip file that is attached to the first post of the links provided here by both @DonManfred and @Erel contains the following code:
B4X:
'Non-UI application (console / server application)
#Region  Project Attributes
   #CommandLineArgs:
   #MergeLibraries: True
#End Region

'change based on the jdbc jar file
#AdditionalJar: mysql-connector-java-5.1.27-bin
'#AdditionalJar: postgresql-9.4.1207

Sub Process_Globals
   Public srvr As Server
   Public rdcConnector1 As RDCConnector
   Public const VERSION As Float = 2.1
   Type DBCommand (Name As String, Parameters() As Object)
   Type DBResult (Tag As Object, Columns As Map, Rows As List)
End Sub

Sub AppStart (Args() As String)
   srvr.Initialize("")
   rdcConnector1.Initialize
   srvr.Port = rdcConnector1.serverPort
   srvr.AddHandler("/test", "TestHandler", False)
   srvr.AddHandler("/rdc", "RDCHandler", False)
   srvr.Start
   Log($"jRDC is running (version = $1.2{VERSION})"$)
   StartMessageLoop
End Sub

Clarification: This is the code that should have been in Main. Not the defaulted UI code that shows up in yours (yours shows the default UI template code when creating a new UI project).
 
Last edited:
Upvote 0

RWK

Member
Licensed User
Longtime User
Hi,

here is a somewhat running example...

1. Load USBWebserver, somewhere mentioned here in the forum.....start it ( only if on Win :) )

2. Place the mySQL Lib in your Lib Folder or change source to your version of mySQL Lib

B4X:
#AdditionalJar: mysql-connector-java-5.1.45-bin

Then run jRDC2 - server......after that start Requester to test..

In Debug mode i had to start the Requester 2 or three times to work..... didn't look at that.

to Erel:
the sql statements in the Download's config on Post 1 are not fitting to the requests mentioned in the Post....maybe therefor vibby had some problems


Greetings
Rainer
 

Attachments

  • jRDC2_Test.zip
    9.5 KB · Views: 280
Upvote 0
Top