RE: Memo Fields in SQL [was...RE: SQL Server Import & VFP Data Source]

Author: Kurt Wendt

Posted: 2012-05-15 at 12:22:22

Hey there Richard,

Thanks for the informative reply. Yes, Am now trying to use the Text

field for the Memo field conversions. As for HOW I am doing this - It's

the Import/Export Wizard that comes w/SQL Server.

The conversion is still giving me errors - including that Codepage

stuff. But, am still trying to work my way thru the errors...

-K-

-----Original Message-----

From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com]

On Behalf Of Richard Kaye

Sent: Tuesday, May 15, 2012 1:10 PM

To: profoxtech@leafe.com

Subject: RE: Memo Fields in SQL [was...RE: SQL Server Import & VFP Data

Source]

SQL<->VFP

CHAR=CHARACTER (fixed width column definition)

VARCHAR=VARCHAR (variable width column definition although VFP fakes it)

TEXT=MEMO (unlimited width for most practical purposes)

VARCHAR and NVARCHAR can work in place of TEXT and are more efficient

in terms of storage in SQL land. You can also avoid certain limitations

of TEXT columns by using VARCHAR. For example, you can't use aggregate

functions on TEXT columns. NVARCHAR & NTEXT are used for storing binary

data and typically used when you want to store text in a

language/encoding scheme that is different from the encoding of the DB

itself, which is probably why your Russian friend recommended that.

Speaking of encoding, that's another thing that can bite you so you need

to be aware of potential differences in your source data and the

encoding of your SQL database.

I don't think you said how you were trying to move your data around -

SPT? Remote views? ODBC/OLE DB will attempt to do implicit conversions

of certain data types to other data types but it doesn't always get it

right and you can get the kind of message you reported. When that

conversion is not applicable, you will need to do your own conversions

using CAST or CONVERT.

--

rk

-----Original Message-----

From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com]

On Behalf Of Kurt Wendt

Sent: Tuesday, May 15, 2012 12:12 PM

To: profoxtech@leafe.com

Subject: Memo Fields in SQL [was...RE: SQL Server Import & VFP Data

Source]

So, I'm now in the middle of trying to convert the VFP data to SQL - and

I get an error like this:

`po_lines` -> [dbo].[po_lines]:

- The data type could not be assigned to the column

"packslip_line_msg_line_no1" in "SQL Server Native Client 10.0".

- The data type could not be assigned to the column

"vendor_line_notes" in "SQL Server Native Client 10.0".

I know it's the issue w/Memo fields - since SQL doesn't have anything

like it. But, if I want to use something even CLOSE to a memo field

within SQL - what type of field should I use? I saw there is Char,

VarChar, Text and more - I just don't the actually differences between

them.

TIA,

-K-

-----Original Message-----

From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com]

On Behalf Of Kurt Wendt

Sent: Tuesday, May 15, 2012 11:20 AM

OK - my Bad!

Obviously I need to go into that Properties button & select the VFP DBC

- before I can hit Next. I made the wrong assumption before - figuring

that when I hit NEXT - it would THEN prompt me for the VFP DBC that I

wanted to Import.

Once I selected the VFP DBC from within the Properties button - I was

now able to successfully hit the Next button.

Just FYI - I've never really worked with SQL before - at least not the

extent of setting up an SQL Database or even installing SQL.

-K-

-----Original Message-----

From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com]

On Behalf Of Kurt Wendt

Sent: Tuesday, May 15, 2012 11:11 AM

In regards to my previous discussion on here - I just installed MS SQL

Server 2008 R2 Express. And, upon looking under programs to run it - I

found this "SQL Server Import and Export Wizard" tool. So - I ran it -

and found that one of the Data Sources available to choose from is

"Microsoft OLE DB Provider for Visual FoxPro". However, upon selecting

that option and hitting Next - I get an error window "Feature is Not

Available. (Microsoft OLE DB Provider for Visual FoxPro)

So - does that just mean that it's not available under the Express

version? IF that IS the case - I find it quite annoying, since if the

feature is supposed to be N/A - then it should NOT even allow you to

select it to begin with!!!

Just to add - I saw the Properties button under the Data Source

selection drop-down, but, I did NOT change any of those Properties.

Thanks,

-K-

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/289EA162F5642645B5CF64D624C66A140E260329@us-ny-mail-002.waitex.net

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2012 Kurt Wendt