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

October 25th, 2004, 02:30 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
|
|
"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.
================================================== =========
|

October 25th, 2004, 03:01 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Could you post any code? I have no idea what is going on?
|

October 26th, 2004, 08:37 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
|
|
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
|

October 26th, 2004, 08:59 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
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
|

October 26th, 2004, 09:16 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
|
|
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
|

October 27th, 2004, 07:01 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
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
|

November 2nd, 2004, 12:16 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
|
|
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
|

May 11th, 2006, 08:08 AM
|
Registered User
|
|
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|
 |