Search found 63 matches

by Yuri_D
Fri May 15, 2020 4:06 pm
Forum: Tricks 'n' Tips
Topic: Fully encrypted SQLite DB with PB 5.71 and SQLCipher.dll
Replies: 18
Views: 13904

Re: Fully encrypted SQLite DB with PB 5.71 and SQLCipher.dll

Hello!

I'm not sure what's wrong but when I'm trying to use this solution I'm getting an error on OpenDatabase() command (PB v5.72):

[16:55:33] [ERROR] UseODBCDatabase(), UseSQLiteDatase() or UsePostgreSQLDatabase() need to be called before using database commands.

Did anybody try it on later PB ...
by Yuri_D
Sat Apr 06, 2019 6:25 pm
Forum: Coding Questions
Topic: A question to COMate experts
Replies: 14
Views: 3420

Re: A question to COMate experts

Hello community!

Once again your help wanted, could you please help?

There are few VBA methods which can do a single or batch data manipulation.

Create(DObject[], async As Boolean)
Delete(DObject[], async As Boolean)
......


I know how to perform single opertations
VBA usage (single):

Dim ...
by Yuri_D
Thu Sep 13, 2018 3:28 pm
Forum: Coding Questions
Topic: A question to COMate experts
Replies: 14
Views: 3420

Re: A question to COMate experts

Yep... I tried to use Delay() there but it seems it doesn't release CPU and WaitWindowEvent( xx) doesn't work without window :/
With the messagebox it works and has no crashes so I need to look into my code, thank you!

Another question: is it possible to clear the COMate error code after it was ...
by Yuri_D
Wed Sep 12, 2018 6:47 pm
Forum: Coding Questions
Topic: A question to COMate experts
Replies: 14
Views: 3420

Re: A question to COMate experts

PB casts them automatically so Str( 100) = ""+ 100
The problem is not in the resizing but what happening with objWorkbook after that if events handling is active.
Can you try this please (but it has a different problem I mentioned earlier)


XIncludeFile "\COMatePLUS.pbi"

;--#xlWindowState ...
by Yuri_D
Wed Sep 12, 2018 12:04 pm
Forum: Coding Questions
Topic: A question to COMate experts
Replies: 14
Views: 3420

Re: A question to COMate experts

1 - it appears when no more objects in the enumeration left and \GetNextObject() returns zero. I think it shall be silent...
2 - I can't make it working separately.. I don't know why but it stops processing events after workbook is opened and 4 events received :shock: :oops:
It works normally in my ...
by Yuri_D
Wed Sep 12, 2018 7:42 am
Forum: Coding Questions
Topic: COM: VBA to VB (SafeArray related question)
Replies: 7
Views: 1382

Re: COM: VBA to VB (SafeArray related question)

Hi mk-soft,

So many rows of code and only one which solved my problem))


Protected.i _iEntity, _iLBound, _iUBound
Protected.COMateObject _objField
Protected.SAFEARRAY *saEntity
Protected.IDispatch *idField

*saEntity = VT_ARRAY( _obj\GetVariantProperty( "Fields")) ; "Fields" VARIANT type: VT ...
by Yuri_D
Tue Sep 11, 2018 7:15 pm
Forum: Coding Questions
Topic: COM: VBA to VB (SafeArray related question)
Replies: 7
Views: 1382

Re: COM: VBA to VB (SafeArray related question)

Hi skywalk,

Thanks, I learned a little bit more and now at least I understand the meaning of fields
* SafeArray *
cDim: 1
cbElements: 16
* rgsabound *
cElements: 78
lLbound: 0

But the problem is that it is an array of objects... and here I'm losing the way :oops:
I tried to wrap it by COMate ...
by Yuri_D
Tue Sep 11, 2018 5:01 pm
Forum: Coding Questions
Topic: COM: VBA to VB (SafeArray related question)
Replies: 7
Views: 1382

Re: COM: VBA to VB (SafeArray related question)

Hi mk-soft,
Thanks, I'm using this add-in but it doesn't help in this case(
I think that iDispatch can point to another array but I have no enough knowledge to proof it and to extract the data
by Yuri_D
Tue Sep 11, 2018 4:49 pm
Forum: Coding Questions
Topic: COM: VBA to VB (SafeArray related question)
Replies: 7
Views: 1382

Re: COM: VBA to VB (SafeArray related question)

:cry:
Nobody knows?
Looks like this Safearray is uni-dimensional, each element has \vt = 9 (Dispatch) and being converted by VT_STR(*Var.Variant) it returns the \Value parameter but Excel can return \Name, \Label and \Type as well.
No idea how to do the same on PB... :oops: :oops: :oops:
by Yuri_D
Tue Sep 11, 2018 9:45 am
Forum: Coding Questions
Topic: A question to COMate experts
Replies: 14
Views: 3420

Re: A question to COMate experts

Hi srod!

Thank you so much! It works like a charm!)

May I ask you a couple of other questions regarding COMate?

1- "COM Error [1]: The operation completed, but was only partially successful." during enumeration processing (I filter it out but I wonder why it appears)
2 - When I'm using COMate ...
by Yuri_D
Mon Sep 10, 2018 7:00 pm
Forum: Coding Questions
Topic: A question to COMate experts
Replies: 14
Views: 3420

Re: A question to COMate experts

Thank you in advance!
by Yuri_D
Mon Sep 10, 2018 6:16 pm
Forum: Coding Questions
Topic: A question to COMate experts
Replies: 14
Views: 3420

Re: A question to COMate experts

Hello srod,

Thank you for your explanation!
Just checked the COMate code and I think I found the temp object destroyer

If command$
COMateClass_Release(*tempCOMateObject)
EndIf
but there are too many asterisks for my programming level so I'm not sure how to modify it to return 2x objects and ...
by Yuri_D
Mon Sep 10, 2018 5:13 pm
Forum: Coding Questions
Topic: COM: VBA to VB (SafeArray related question)
Replies: 7
Views: 1382

COM: VBA to VB (SafeArray related question)

Hello!

Can you help me to translate this VBA code to PB please?


Function FieldType(obj As Object, label As String) As String
FieldType = "string" 'default
Dim f As Integer
For f = LBound(obj.fields) To UBound(obj.fields)
Dim lc: lc = LCase(label)
If (lc = LCase(obj.fields(f).label) Or lc ...
by Yuri_D
Sun Sep 09, 2018 5:58 pm
Forum: Coding Questions
Topic: A question to COMate experts
Replies: 14
Views: 3420

A question to COMate experts

Hello!

Could you please advise how to read properties from an COMate Enumeration object?
This COMate object doesn't support GetString/Integer etc. methods but in my case, besides the collection itself it returns a number of elements and other useful properties.
Of course I can create two objects ...
by Yuri_D
Thu Aug 23, 2018 10:23 am
Forum: Coding Questions
Topic: [PB5.62] SQLite variable binding
Replies: 8
Views: 2406

Re: [PB5.62] SQLite variable binding

@Freak
Thank you for the explanation!
Does it mean that it is not possible to use placeholders for queries morphing?
The strings I need to insert don't contain "=" symbol. I tried:
_sString = "[main].[tblProductFamilies].[ID] IN("+ ... +") And"
_sString = "IN("+ ... +")"
but both variants don't work(