Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
| Search | Today's Posts | Mark Forums Read
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 25th, 2004, 02:30 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default "Cannot initialize data binding" error

hi all...

i have a datagrid connected to an ado source. Im setting the grid.datasource property at run time giving to it a recordset that comes from a dll with aduseclient switch on it.

i dont have problems on a lot of system, but a particular one display the error i write at the beggining...

any one have any clue about what can be happening here???

thank you in advance....

HTH

Gonzalo
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
  #2 (permalink)  
Old October 25th, 2004, 03:01 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Could you post any code? I have no idea what is going on?
  #3 (permalink)  
Old October 26th, 2004, 08:37 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

ok.. let's see some code:

Code:
 
...
Set grdDatos.DataSource = Nothing <- i clear the data grid
Set grdDatos.DataSource = ObjSiap.ObjContribs.DarListaContribuyentes(True, True, ObjConfi.bOrdenLC, ObjConfi.sNumColLC) <- this method return a recordset.. it's on a dll
grdDatos.Refresh <- another try to fix the problem
the error is somewhere between the set datasource and the refresh...

in the dll the code is:

Code:
Public Function DarListaContribuyentes(bPf As Boolean, bPj As Boolean, bAsc As Boolean, sTipo As String) As ADODB.Recordset
    Dim Rs As ADODB.Recordset
    Set Rs = New ADODB.Recordset
    Dim sSql As String
    sSql = ""
    If bPf And bPj Then
        sSql = " "
    ElseIf bPf Then
        sSql = " WHERE tipopersona = 0"
    ElseIf bPj Then
        sSql = " WHERE tipopersona = 1"
    End If
    If StrComp(UCase$(sTipo), "C") = 0 Then
        sSql = sSql & " ORDER BY cuit"
    Else
        sSql = sSql & " ORDER BY descrip"
    End If
    If Not bAsc Then
        sSql = sSql & " DESC"
    End If
    Rs.CursorLocation = adUseClient
    Rs.Open "SELECT CUIT,DESCRIP from contribs" & sSql, ClaseBase_ConexionBD, adOpenStatic
    Set DarListaContribuyentes = Rs
    Set Rs = Nothing
End Function
thank you...


HTH

Gonzalo
  #4 (permalink)  
Old October 26th, 2004, 08:59 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Ok, what is the setup on that one machine that is giving you problems? There has to be something different... So that code works on all of the other machines?

Brian
  #5 (permalink)  
Old October 26th, 2004, 09:16 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

as far as i see, there is no diference in the setup. the install process is handle by install shield. i run the depends
program to see is there was any problem but it have the same dll's that the rest of the pcs. i didn't find any info on msdn
but i find some on the google refering to some mfc libraries but that's doesn't seen to be a problem for me... or maybe yes
and i missing something...

what do you want to know about the setup???

HTH

Gonzalo
  #6 (permalink)  
Old October 27th, 2004, 07:01 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

My guess is that maybe there are differences in ADO? I mean, you said it worked correctly on other computers. Unless it happens to be permission problems from that computer in connecting to the database. Or maybe that computer can't "see" the database?

Brian
  #7 (permalink)  
Old November 2nd, 2004, 12:16 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

i try installing jet 4.0 SP 8.. the pc is a nt workstation... no luck... any other idea?? could be something with the dbgrid???

HTH

Gonzalo
  #8 (permalink)  
Old May 11th, 2006, 08:08 AM
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello i had the same problem and here is the solution first make sure msstdfmc.dll file exists in ur "system32" folder for winxp or "system" folder in win98,if it exists then goto Start>Run and type in the following:
RegSvr32 <the path to system32 / system dir>\msstdfmt.dll
Now the Datagrid Control Works fine in Vb.net as well as Vb 6.0



Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal report binding with large data set, error lankark Crystal Reports 0 April 3rd, 2008 09:16 AM
Data Binding - Editing GridView Row Data desk_star BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 7 December 30th, 2007 11:07 AM
Initialize data in an HTML Control bnewton1 BOOK: Beginning Ruby on Rails 5 July 27th, 2007 05:24 PM
Binding to Filtered Data (or Data subsets) gdbjohnson C# 8 August 27th, 2004 01:59 PM
Data binding. mmwaikar ADO.NET 0 July 28th, 2003 12:51 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.