Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Importing from FoxPro

Author  Topic 

ajthepoolman
Constraint Violating Yak Guru

384 Posts

Posted - 2004-02-19 : 17:31:30
Hello all. I have a quick question for you.

When importing from a FoxPro table with Blob fields, what type of column would I use in SQL2000? Is this even possible?

I thought about setting an nvarchar column and then specifying in my query to only pull over that many characters, but the Import wizard won't even read the blob column.

Any suggestions?

Thanks!

Aj

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-02-19 : 17:44:21
Blobs can be stored in IMAGE data type in SQL Server 2000. However, it is not even recommended to store blobs in the database. It is recommended that you store the blob on the file system and the path and file name in the database (a pointer).

Tara
Go to Top of Page

ajthepoolman
Constraint Violating Yak Guru

384 Posts

Posted - 2004-02-19 : 17:48:07
Thanks for the quick reply Tara.

I actually plan on storing them as either a large nvarchar field or ntext. I could care less about storing it as an actual blob field. This blob field just holds Notes about things, so I doubt if any of them actually stretch more than 150 characters.

The problem though is that the SQL Import Wizard won't even read the field. Do you know of a way around this?

Thanks again!

Aj
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-02-19 : 17:52:16
So this blob that you are talking about, is it an image? That's usually what is meant by blob. If it is an image, you can't use nvarchar or ntext.


Tara
Go to Top of Page

ajthepoolman
Constraint Violating Yak Guru

384 Posts

Posted - 2004-02-19 : 17:58:25
It is text. And I am incorrect when I said they are declared as blob fields, they are actually Memo(10). I assume that the 10 is just storing a pointer.

Aj
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-02-19 : 18:05:10
Text data type would be the one to use for Memo unless you know the maximum length is something that VARCHAR can handle.

I do not know a way around your problem with the wizard. Do you have the latest FoxPro driver installed? Maybe there is a newer one that works.

Tara
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-02-20 : 10:39:08
Yo Poolman...

Barley worked with FoxPro (Only cause I had to)...How do you extract the data?

How Much Data?

Can you create a view in FoxPro Amd convert the Memo field to text (Really varchar..)

I'm assuming Access and foxPro are very similar....

And when you say Import wizard, are we talking DTS?

Can you link Access to FoxPro and extract it with that, then convert, then use DTS?

And I'm sure this is a 1 time thing (biggest lie in IT)



Brett

8-)
Go to Top of Page

ajthepoolman
Constraint Violating Yak Guru

384 Posts

Posted - 2004-02-20 : 10:46:40
GOT IT!

Last night my Director tried to import the tables into Access 2000. It failed. So on a hunch he tried Access 97. It took it.

So then he imported the 97 database into 2000 and then I grabbed it with the Import Wizard in SQL2000!

Thankfully there is not much data. And the only hangup that I have had to work around is that a Date/Time field in Access tries to come into SQL as a smalldate. I have had to transform all the smalldate fields into Datetime.

Other than crap data, it is working like a charm!

Thanks all!

Aj
Go to Top of Page

ajthepoolman
Constraint Violating Yak Guru

384 Posts

Posted - 2004-02-20 : 10:48:58
And let me add this.

I first went to a foxpro forum for this. I posted a question and have yet to get a response that actually addresses my question.

On the flip side, I come here and in less than 24 hours I have a solution and great tips for future run-ins with FoxPro.

You guys are great! I hope to be able to swoop in someday like you all and help solve peoples problems!

BIG OLE SUPER THANKS!!!

Aj
Go to Top of Page
   

- Advertisement -