Closed Spirit412 closed 10 months ago
I have return error
Please, provide the DDL of your FZL
table
How setup rsfbclient connect to fdb with sql_dialect and no_db_triggers ?
no_db_triggers
is not supported yet.
sql_dialect
just call the dialect()
method on connection builder. More infos:
.db_name("/plinor/rust_firebird/test.fdb")
.user("SYSDBA")
.pass("masterkey")
.dialect(Dialect::D1)
.connect()?;
let mut conn = rsfbclient::builder_pure_rust()
.host("localhost")
.db_name("/plinor/rust_firebird/test.fdb")
.user("SYSDBA")
.pass("masterkey")
.dialect(Dialect::D1)
.charset(charset::UTF_8)
.transaction(TransactionConfiguration {
lock_resolution: TrLockResolution::NoWait,
..TransactionConfiguration::default()
})
.connect()?;
Error
exists libfbclient.so: true
Error: Sql { msg: "invalid request BLR at offset 132\nfunction POS is not defined\nmodule name or entrypoint could not be found", code: -1 }```
I found the constant rsfbclient_core::ibase::isc_dpb_no_db_triggers
, but I don't know how to change it and apply it to the query
I found the constant
rsfbclient_core::ibase::isc_dpb_no_db_triggers
, but I don't know how to change it and apply it to the query
Your invalid request BLR at offset 132\nfunction POS
is it caused by database triggers? Or are you just trying to change this flag for another reason?
I'm investigating how provide this flag on the connection builder
I found the constant
rsfbclient_core::ibase::isc_dpb_no_db_triggers
, but I don't know how to change it and apply it to the query
Now you can disable the db trigger, try my last commit:
[dependencies]
rsfbclient = { git = "https://github.com/fernandobatels/rsfbclient.git", branch = "feature-151" }
let mut conn = rsfbclient::builder_pure_rust()
.host("localhost")
.db_name("/plinor/rust_firebird/test.fdb")
.no_db_trigger()
.....
.connect()?;
I found the constant
rsfbclient_core::ibase::isc_dpb_no_db_triggers
, but I don't know how to change it and apply it to the queryNow you can disable the db trigger, try my last commit:
[dependencies] rsfbclient = { git = "https://github.com/fernandobatels/rsfbclient.git", branch = "feature-151" }
let mut conn = rsfbclient::builder_pure_rust() .host("localhost") .db_name("/plinor/rust_firebird/test.fdb") .no_db_trigger() ..... .connect()?;
"Cargo.toml"
rsfbclient = { git = "https://github.com/fernandobatels/rsfbclient", branch = "feature-151"}
n main() -> Result<(), FbError> { let file_fdb: &str = "test.fdb"; println!("exists test.fdb: {}", Path::new(&file_fdb).exists());
let mut conn = rsfbclient::builder_pure_rust()
.host("localhost")
.db_name("test.fdb")
.user("SYSDBA")
.pass("masterkey")
.dialect(Dialect::D1)
.no_db_trigger()
.connect()?;
let rows = conn.query_iter("SELECT * FROM FZL", ())?;
println!("-------------");
println!("Table name");
println!("-------------");
for row in rows {
let (r_name,): (String,) = row?;
println!("{:^10}", r_name);
}
Ok(())
Error:
error[E0425]: cannot find function builder_pure_rust
in crate rsfbclient
--> main.rs:15:36
|
15 | let mut conn = rsfbclient::builder_pure_rust()
| ^^^^^^^^^^^^^^^^^ not found in rsfbclient
I found the constant
rsfbclient_core::ibase::isc_dpb_no_db_triggers
, but I don't know how to change it and apply it to the queryYour
invalid request BLR at offset 132\nfunction POS
is it caused by database triggers? Or are you just trying to change this flag for another reason?I'm investigating how provide this flag on the connection builder
Yes, I want to connect without triggers. Because if do not disable triggers, there will be a connection error. The same thing happened when trying to connect to Python using the fdb library
If it is possible to use triggers? I can send you an example database file
Error:
error[E0425]: cannot find function `builder_pure_rust` in crate `rsfbclient` --> main.rs:15:36 | 15 | let mut conn = rsfbclient::builder_pure_rust() | ^^^^^^^^^^^^^^^^^ not found in `rsfbclient`
My bad. Try enabling the pure_rust
feature
[dependencies]
rsfbclient = { git = "https://github.com/fernandobatels/rsfbclient.git", branch = "feature-151", features=["pure_rust"] }
Error:
error[E0425]: cannot find function `builder_pure_rust` in crate `rsfbclient` --> main.rs:15:36 | 15 | let mut conn = rsfbclient::builder_pure_rust() | ^^^^^^^^^^^^^^^^^ not found in `rsfbclient`
My bad. Try enabling the
pure_rust
feature[dependencies] rsfbclient = { git = "https://github.com/fernandobatels/rsfbclient.git", branch = "feature-151", features=["pure_rust"] }
Yes, it works! Thanks
Are you still facing BLR offset problems when select?
If it is possible to use triggers? I can send you an example database file
The new flag only disable the database level triggers. Table triggers will still be working.
Are you still facing BLR offset problems when select?
There are no more problems with reading the data.
New version released with this new resource: 0.24.0
I used OS Linux. Version Firebase file fdb 2.5. Database uses UDF My code:
I have return error
EDIT COMMENT: Used Python 3.11 on Linux, i readed fdb file Firebird 2.5
How setup rsfbclient connect to fdb with sql_dialect and no_db_triggers ?