[VCOM] variable error
Igor Gomon
giv at tlc.kherson.ua
Mon Jan 19 09:37:03 CST 2004
Hi Lee,
> Ruslan
>
> I plugged your code into your other code that creates a database and 2
> tables. Here is the code.
>
> Private Sub Form_Load()
> On Error GoTo Error
>
> 'initialize Valentina database engine
> V.Init 10
>
> Dim Db As VDataBase
> Set Db = CreateTestDb
> If Not Db Is Nothing Then
>
> WORKS FINE UP TO HERE - NOW, YOUR NEW CODE
>
> Dim BaseObject As VBaseObject
> Dim name As String
>
> BaseObject = Db.BaseObject(1)
> name = BaseObject.name
>
> When it gets to "BaseObject = Db.BaseObject(1)'", here is the new error it
> reports:
>
> Object variable or With block variable not set
>
> Any ideas?
Of course, in VB6 you must use 'set' keyword when initializing object
variable.
So just write: Set BaseObject = Db.BaseObject(1)
--
Best regards,
Igor Gomon
-------------------------------------------------------------
e-mail: giv_ua at inbox.ru
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list