Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #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,190
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.
================================================== =========
Reply With Quote
  #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?
Reply With Quote
  #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,190
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
Reply With Quote
  #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
Reply With Quote
  #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,190
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
Reply With Quote
  #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
Reply With Quote
  #7 (permalink)  
Old November 2nd, 2004, 11: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,190
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
Reply With Quote
  #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

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 10: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



All times are GMT -4. The time now is 11:11 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.