Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with ODBC on MSQL 2000 back end
Message
 
 
To
19/08/2003 13:31:28
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00820166
Message ID:
00821654
Views:
19
Hi Toni,

Below is the test I ran and I didn't get any error messages.
IF EXISTS (SELECT name 
	   FROM   sysobjects 
	   WHERE  name = N'test01' 
	   AND 	  type = 'U')
    DROP TABLE test01
GO
create table test01 (
pk int IDENTITY(1, 1), 
c2 nvarchar(7) NOT NULL)
GO
...
lcSql = [Insert into test01  (c2) values (' ')]
? SqlExec(lnConn, lcSql)
>Hi Sergey,
>
>I'am trying to determine what is wrong, but I have no idea where to start. First problem is that with SQL 7.0 everything works OK. Problem is yust with SQL 2000 server and also what makes trouble bigger Exactly Same insert query whith same inserted data values which I run via query analyzer (SQL 2000)work normal. I get error message "String or binary data would be truncated" only when I send Query through VFP 6.0 call SQLEXEC(handle,"query")
>
>Query is:
>Insert into mytable (field1) values (' ')
>
>Field1 in mytable is nvarchar(7)
>
>As I said if I run same query "Insert into mytable (field1) values (' ')"
>from query analyizer SQL 2000 back end it works OK.
>
>Perhaps this is problem with comunication betwen VFP 6.0 and SQL 2000 back end, becouse with VFP 6.0 and SQL 7.0 I get no message.
>
>If you or anybody else have any ideas where to start please advise.
>
>
>Regards
>
>Toni
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform