Use data in an IVCursor to populate DataGridView in VB,NET

Dennis Wallentin xldennis at gmail.com
Sat Jan 8 08:27:25 CST 2011


Ruslan,

Thanks for the valuable input which is appreciated. No, I didn't find among
the examples what I'm asking about.

However, as usual ODBC comes to rescure but I still want to use .NET
features to do it. The below code shows what I like to achieve:

        Dim con As String = "Driver={Valentina ODBC
Driver};IsDatabaseLocal=yes;Database=FirstDB.vdb"
        Dim sql As String = "SELECT * FROM Person"
        Dim connection As New OdbcConnection(con)
        Dim dataadapter As New OdbcDataAdapter(sql, connection)
        Dim ds As New DataSet()
        dataadapter.Fill(ds, "Person_Table")

        'Populate the DataGridView with data.
        Me.dgwVDB.DataSource = ds
        Me.dgwVDB.DataMember = "Person_Table"

How can I do it with Valentina's .NET Features?

Thanks in advance,
Dennis

2011/1/8 Ruslan Zasukhin <ruslan_zasukhin at valentina-db.com>

> On 1/7/11 4:32 AM, "Dennis Wallentin" <xldennis at gmail.com> wrote:
>
> Hi Dennis,
>
> > As I'm still on the learning stage I have the following test code to
> retrieve
> > data from a VDB:
> >
> > Dim ivcCursor As IVCursor
> >         ivcCursor = mDataBase.SqlSelect(inQuery:="SELECT * FROM Person",
> _
> >
> > inCursorLocation:=EVCursorLocation.kClientSide, _
> >                                       inLockType:=EVLockType.kReadOnly, _
> >
> > inDirection:=EVCursorDirection.kForwardOnly)
> >
> >
> > In what way should I use the IVCursor to populate a DataGridView control
> with
> > the retrieved data?I did notice that I can iterate but that's not the
> route I
> > want to take as I want to do it faster.
>
> If you going to use this cursor with Data Grid, then I think better make
> not
> ForwardOnly, but Random. Bevause you may want scroll forward and back.
>
>
> About populate ... Not sure what you ask about.
> Have you check our examples?  VNET/VB ?
>
> Yes you must GO TO Nth record
> Then read values from fields.
>
> This is fast enough, than more for client side cursor
>
>
> --
> Best regards,
>
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
>
> Valentina - Joining Worlds of Information
> http://www.paradigmasoft.com
>
> [I feel the need: the need for speed]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>



-- 
With kind regards,
Dennis W
-------------------------------------------------
XL-Dennis about .NET & MS Excel
http://xldennis.wordpress.com/

XL-Dennis Consulting
http://www.excelkb.com/index.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20110108/8d36b771/attachment.htm>


More information about the Valentina mailing list