Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / June 2005



Tip: Looking for answers? Try searching our database.

"String data, right truncation"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
senc - 24 Jun 2005 08:18 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.