Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VARCHAR problem with SQL Server 2003
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01504092
Message ID:
01504111
Views:
64
>>>Have a table filled with comments. Use varchar for the comments. Something changed in our testing environment, this has been working fine for at least a year. Now a SQL Select to this table the field returned back in VFP in the cursor returns an empty text field. If I copy the SQL select command out of the code, run it at the command prompt I get a memo field with the text that is there which WAS the behavoir before.
>>>
>>>Any ideas what to look for.
>>
>>Can you show some code as how do you retrieve the data from SQL Server? If you try sqlexec from the command window, what do you get?
>>
>>Also, there is no SQL Server 2003, are you using SQL Server 2005? And what is the type of the field - text or varchar(max)?
>
>Basically get all comment records for a claim in VFP Cursor.
>In the application this brings back an empty text field. At command prompt brings back a memo field. It's not a syntax problem, something has changed somewhere outside of VFP. I don't manage the servers. They are carved out VM's in a big bank servers with all vm's. I need help in trying to control the changed environment.
>
> cSQL = [select a.*, ] + ;
> [ b.commenttypeid, ] + ;
> [ c.osuserid ] + ;
> [from commentsclaim a ] + ;
> [left outer join commentstype b ] + ;
> [ on a.commenttypeuniqueid = b.uniqueid ] + ;
> [left outer join appsyssecusers c ] + ;
> [ on a.userid = c.userid ] + ;
> [where a.fileid = ?.cfileid ] + ;
> [order by a.commenttimestamp desc ]

Well, for a temp solution may be you can cast this field to text in the select statement?

I've checked what I have in my DSN in the meantime

Microsoft SQL Server ODBC Driver Version 06.01.7600

Data Source Name: DSNName
Data Source Description: Local data
Server: MyServer
Database: (Default)
Language: (Default)
Translate Character Data: Yes
Log Long Running Queries: No
Log Driver Statistics: No
Use Regional Settings: No
Prepared Statements Option: Drop temporary procedures on disconnect
Use Failover Server: No
Use ANSI Quoted Identifiers: Yes
Use ANSI Null, Paddings and Warnings: Yes
Data Encryption: No
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform