Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC Data Retrieval - Want to add add'l blank fields

Status
Not open for further replies.

jmueller

MIS
Oct 9, 2001
57
US
Hello everyone! Just found out there's a MAS 90 forum... I sure can use some help on this one... There's got to be a simple answer so here goes:

I'm using Visual Foxpro 8.0 to pull data down from our MAS 200 tables.

Can someone tell me how to add some additional blank fields in a sql-select stmt. For example, here's what I'm trying to do:

Select CustomerName, space(30) as MyFieldName from AR1_CustomerMaster

It doesn't like the space() function (which works with SQL tables). It doesn't give any error it just doesn't pull down any records.

Anyone?

Thanks.

Jack.
 
Hi. any chance that your sql statement would be happier with " " as MyFieldName?

ChaZ
 
Not sure Chaz... I'm going to go and see!

Thanks for responding... let me ask you (or anyone) another question....

I'm using ProvideX ODBC V3.21 with Visual Foxpro to pull data down from MAS 200 V3.71. Everything works fine except when I perform a SELECT with a DATE field parameter, I get nothing. For example:

Select * FROM ARN_InvHistoryHeader
WHERE InvoiceDate >= '01/01/04'

The above returns nothing. I've tried putting the date in every possible format without any luck. (At least I think I did).

Somebody out there must have had this problem. I did see a post by someone with the problem but unfortunetly nobody answered. Hope I have better luck.

Thanks again,
Jack
 
Hi. I am not that familiar with Foxpro, but I can tell you that the odbc driver returns dates as a date value, so your text field won't work.

Using access, I would put where invoicedate >= #01/01/04#, maybe that will work for you also.

ChaZ
 
I tried #01/01/04# but didn't have any luck. Can you tell me what version of odbc driver you're using?

Thanks.

Jack.
 
I am using 3.21

Can you tell what format your query is returning the date in?

ChaZ
 
Hi. I am sure there is a date format to use in your foxpro queries. Dbase used {4/1/04} maybe foxpro uses that. Does Foxpro have a help screen you can use?

ChaZ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top