Hi,
I get the following error message when i try to open a ADODB Connection from
a Visual Basic 6 application.
Error: "String data, right truncation"
Actually, this application works with no problem at all of the customers
except one of them.
The code is something like that:
Dim cn As New adodb.Connection
Dim rs As New adodb.Recordset
Dim cServer As String
Dim cProvider As String
Dim cDatabase As String
Dim cCn As String
Dim cPass As String
Dim mp As New clsModProcs
Dim cc As New clsCrypto
Dim gCpassword As String
cServer = cServerName 'S.C.
If cServerName = "" Then
cServer = Me.Get_ServerName()
End If
cDatabase = "MASTER"
cProvider = "SQLOLEDB.1"
gCpassword = "my password"
cCn = "Data Source=" & cServer & ";Provider=" & cProvider
cCn = cCn & ";DATABASE=" & cDatabase & ";Trusted_Connection=NO"
cn.Open cCn, "user name", gCpassword
....
The username and password are no longer than 20 characters.
I searched for this error in google, but could not find the reason and a
solution to this problem. Can anyone help me please?
thanks in advance,
Senc.
Val Mazur (MVP) - 26 Jun 2005 15:55 GMT
Hi,
Check if cServer is not blank. Best way is to print connection string after
it was built and see what could be wrong in it

Signature
Val Mazur
Microsoft MVP
http://xport.mvps.org
> Hi,
>
[quoted text clipped - 43 lines]
> thanks in advance,
> Senc.
senc - 30 Jun 2005 09:54 GMT
Hi,
Thanks for your advice, but it s not the problem.
I had already checked the connection string before i posted. There was
nothing wrong with it.
I suppose there is a conflict between the version of MDAC and the OS.
We will install another MDAC Version and test it again. Some years ago we
had a problem like that and it was the OS language.
Thanks.
> Hi,
>
[quoted text clipped - 48 lines]
> > thanks in advance,
> > Senc.