[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-odbc
Subject:    RE: Insert records in a VB5 recordset
From:       Venu <venu () mysql ! com>
Date:       2001-09-26 7:50:03
[Download RAW message or body]

Hi !!

> -----Original Message-----
> From: Ing. Gustavo Edelstein [mailto:gedelstein@equiplus.com]
> Sent: Tuesday, September 25, 2001 2:51 PM
> To: venu@mysql.com; myodbc@lists.mysql.com
> Subject: Re: Insert records in a VB5 recordset
>
>
> Hi Venu,
> I'm sending you the code snipet to open the RDO recordset and writing new
> records. I'm not using DSNs
>
> Dim rs As rdoResultset
>
> Set rs = cn1.OpenResultset("Select * from db_campos Where db_nombre='" &
> SessionInfo.DataBaseName & "';", rdOpenKeyset, rdConcurValues)
>
> for i=1 to ....
>             rs.AddNew
>             rs!db_nombre = SessionInfo.DataBaseName
>             rs!campo_nombre = Me.ctlDTPara1.list(i)
>             rs!campo_desc = Me.ctlDTPara2.list(i)
>             rs!campo_incluir = 0
>             rs!nivel_seguridad = 0
>             rs.Update
> next i
>
MyODBC supports only static(rdOpenStatic) and
forward-only(rdOpenForwardOnly) cursor types, and it doesn't support
keyset(rdOpenKeyset) and dynamic(rdOpenDynamic) typs yet. So, you need to
choose the one which suites for you. Even if you specify other than the
first two, driver will return a warning.

So, open rs as follows:
Set rs = cn.OpenResultset(SQL, rdOpenStatic, rdConcurRowVer, rdExecDirect)

Also make sure to toggle the "Don't optimize column width" option from the
DSN setup. If you are not using DSN, then specify OPTION=1 in the connection
string itself, then it will work fine.

Regards, venu
--
For technical support contracts, go to https://order.mysql.com
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /  Mr. Venu <mailto:venu@mysql.com>
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer
/_/  /_/\_, /___/\___\_\___/ California, USA
       <___/ www.mysql.com



---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail myodbc-thread3911@lists.mysql.com

To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail myodbc-unsubscribe@lists.mysql.com instead.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic