Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: data connection  (Read 4340 times)

ghon

  • Newbie
  • *
  • Posts: 23
    • View Profile
data connection
« on: August 03, 2023, 12:09:25 am »
How can I change connection as
Driver
Server
Port
User Name
Password
at runtime from qt application.
Thank u in advance.

Subst

  • Sr. Member
  • ****
  • Posts: 450
    • View Profile
Re: data connection
« Reply #1 on: August 03, 2023, 10:22:48 am »
In such case U need to open database in your application, create model for needed table and transfer it to dataSource
like this

Code: [Select]
LimeReport::ReportEngine *report=new LimeReport::ReportEngine(this);
report->dataManager()->addModel(...)

may be exists another way to solve the problem, I can't to come quickly.
Lets wait for Alex?
« Last Edit: August 03, 2023, 10:42:08 am by Subst »

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1005
    • View Profile
Re: data connection
« Reply #2 on: August 05, 2023, 11:40:19 am »

ghon

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: data connection
« Reply #3 on: August 22, 2023, 10:12:43 pm »
I'm Using postgres I need to change the connection(server,password,port,database) at runtime