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!

Problem with txt file import

Status
Not open for further replies.

rninja

Technical User
Apr 11, 2001
381
US
First off, let me say: I have never used MS SQL databases before. I have a dilema whereby my friend's last developer sent a txt file with the database in it. I have come to the conclusion that it is run on a windows 2000 server, with IIS 5, and either MS SQL 7 or MS SQL 2000.

The developer is being a tool and not letting her know how to use it. I tried a basic inport into MS SQL 2000, but it always failed to complete the import. I don't understand why.

I am going to post the beginning of this database file and hopefully someone can let me know what to do with it or how I can get it to work. I already tried also using the file as a .mdf file, but it didn't seem to work. The file in totality is about 6MB.

I appreciate any help with this, as it is important.

Here is the beginning of the file:
FFFfg`
@
P
0



à ð ° À Ð   P ` p €  àÐÀ°p€ °ÀÐàð  0@@0  ðàÐÀ°P`p€ °ÀÐàð  0@Pp€ 0@P`ð  ÀÐàp€ ° 0@P`À°ð Ðàp€ 0@`P  ÀÐðàP`°p€ àð@  0p`Р°À€0@P  ðàÐÀ°`p€  À
°
€ 
p
`€
Pp
@`
0P
@
0

ð
à
Ðð Àà °Ð  À ° €  p `€ Pp @` 0P @ 0  ð à ÐðÀà°ÐÀ°P @0€p`
@ €
0 p
`
P
 @
0
ð

à


Ð
ð
À
°
à
Ð
 
ÐÀ °  ðà €ðpàÐ`PÀ@°0  Ð€Àp°` P@€p0`P@ 0   ððàÐÀ°à€ p€p``PP@@0 0 ð à Ð ðÀ °   à Ð€ Àp °`  
  Z   ø:   ¨  ^  9  8 W!À `   5   =    X
p;    F 0       ? ( c o n v e r t ( s m a l l i n t , 0 ) ) 0       ! ( 8 0 0 0 ) i 0       ½ ( c a s e w h e n ( [ r o w c n t ] > 2 1 4 7 4 8 3 6 4 7 ) t h e n 2 1 4 7 4 8 3 6 4 7 e l s e ( c o n v e r t ( i n t , [ r o w c n t ] ) ) e n d ) ÿ 0       ³( c o n v e r t ( t i n y i n t , ( ( [ b i t p o s ] & 7 ) + c a s e w h e n ( [ t y p e s t a t ] & 1 = 0 ) t h e n 8 e l s e 0 e n d + c a s e w h e n ( ( [ t y p e s t a t ] & 2 < > 0 o r ( t y p e _ n a m e ( [ x t y p e ] ) = ' i m a g e ' o r t y p e _ n a m e ( [ x t y p e ] ) = ' t e x t ' ) a n d [ c o l s t a t ] & 0 x 1 0 0 0 < > 0 ) ) t h e n 1 6 e l s e 0 e n d + c a s e w h e n ( ( ( t y p e _ n a m e ( [ x t y p e ] ) = ' i m a g e ' o r t y p e _ n a m e ( [ x t y p e ] ) = ' t e x t ' ) a n d [ c o l s t a t ] & 0 x 2 0 0 0 < > 0 o r ( t y p e _ n a m e ( [ x t y p e ] ) = ' t i m e s t a m p ' o r ( t y p e _ n a m e ( [ x t y p e ] ) = ' c h a r ' o r t y p e _ n a m e ( [ x t y p e ] ) = ' b i n a r y ' ) ) a n d [ t y p e s t a t ] & 1 = 0 ) ) t h e n 3 2 e l s e 0 e n d + c a s e w h e n ( [ c o l s t a t ] & 4 < > 0 ) t h e n 6 4 e l s e 0 e n d + c a s e w h e n ( [ c o l s t a t ] & 1 < > 0 ) t h e n 1 2 8 e l s e 0 e n d ) ) ) 0        ( c o n v e r t ( t i n y i n t , x t y p e t o t d s ( [ x t y p e ] , ( 1 - ( [ t y p e s t a t ] & 1 ) ) ) ) ) 0        ( c o n v e r t ( s m a l l i n t , c o l u m n p r o p e r t y ( [ i d ] , [ n a m e ] , ' o l d u s e r t y p e ' ) ) ) 0       W ( c o n v e r t ( v a r c h a r ( 2 5 5 ) , [ a u t o v a l ] ) ) 0       û( c o n v e r t ( s m a l l i n t , c a s e w h e n ( ( t y p e _ n a m e ( [ x t y p e ] ) = ' n t e x t ' o r ( t y p e _ n a m e ( [ x t y p e ] ) = ' i m a g e ' o r t y p e _ n a m e ( [ x t y p e ] ) = ' t e x t ' ) ) ) t h e n n u l l w h e n ( t y p e _ n a m e ( [ x t y p e ] ) = ' u n i q u e i d e n t i f i e r ' ) t h e n [ x p r e c ] e l s e ( o d b c p r e c ( [ x t y p e ] , [ l e n g t h ] , [ x p r e c ] ) ) e n d ) ) !0       O ( o d b c s c a l e ( [ x t y p e ] , [ x s c a l e ] ) ) 0       ] ( c o n v e r t ( i n t , s i g n ( ( [ c o l s t a t ] & 4 ) ) ) ) 0       ] ( c o n v e r t ( i n t , s i g n ( ( [ c o l s t a t ] & 4 ) ) ) ) 0       _ ( c o n v e r t ( i n t , ( 1 - ( [ t y p e s t a t ] & 1 ) ) ) ) 0       • ( c o n v e r t ( s y s n a m e , c o l l a t i o n p r o p e r t y f r o m i d ( [ c o l l a t i o n i d ] , ' n a m e ' ) ) ) ­ 0      © ( c o n v e r t ( b i n a r y ( 5 ) , c o l l a t i o n p r o p e r t y f r o m i d ( [ c o l l a t i o n i d ] , ' t d s c o l l a t i o n ' ) ) ) 0  
    ( c o n v e r t ( s m a l l i n t , t y p e p r o p e r t y ( [ n a m e ] , ' o l d u s e r t y p e ' ) ) ) LW!0       A( c o n v e r t ( b i t , c a s e w h e n ( ( t y p e _ n a m e ( [ x t y p e ] ) = ' n v a r c h a r ' o r ( t y p e _ n a m e ( [ x t y p e ] ) = ' v a r c h a r ' o r t y p e _ n a m e ( [ x t y p e ] ) = ' v a r b i n a r y ' ) ) ) t h e n 1 e l s e 0 e n d ) ) 0       [ ( c o n v e r t ( b i t , ( 1 - ( [ s t a t u s ] & 1 ) ) ) ) 0       e ( c o n v e r t ( t i n y i n t , x t y p e t o t d s ( [ x t y p e ] , 0 ) ) ) u 0       M ( c o n v e r t ( v a r c h a r ( 2 5 5 ) , n u l l ) ) 0       ( c o n v e r t ( s m a l l i n t , c a s e w h e n ( ( t y p e _ n a m e ( [ x t y p e ] ) = ' n t e x t ' o r ( t y p e _ n a m e ( [ x t y p e ] ) = ' i m a g e ' o r t y p e _ n a m e ( [ x t y p e ] ) = ' t e x t ' ) ) ) t h e n n u l l e l s e ( t y p e p r o p e r t y ( [ n a m e ] , ' p r e c i s i o n ' ) ) e n d ) ) 0       s ( c o n v e r t ( t i n y i n t , t y p e p r o p e r t y ( [ n a m e ] , ' s c a l e ' ) ) ) 0       • ( c o n v e r t ( s y s n a m e , c o l l a t i o n p r o p e r t y f r o m i d ( [ c o l l a t i o n i d ] , ' n a m e ' ) ) ) 0       m ( c o n v e r t ( s m a l l i n t , ( 2 + 4 * ( [ s t a t u s ] & 1 ) ) ) ) 0       ? ( c o n v e r t ( s m a l l i n t , 0 ) ) 0       O ( c o n v e r t ( b i t , ( [ s t a t u s ] & 1 ) ) ) 0      O ( c o n v e r t ( b i t , ( [ s t a t u s ] & 2 ) ) ) !0  
   Ù ( c o n v e r t ( n v a r c h a r ( 4 0 0 0 ) , c a s e w h e n ( [ s t a t u s ] & 2 = 2 ) t h e n ( u n c o m p r e s s ( [ c t e x t ] ) ) e l s e [ c t e x t ] e n d ) ) u 0      ? ( c o n v e r t ( s m a l l i n t , 0 ) ) 0      ? ( c o n v e r t ( s m a l l i n t , 0 ) ) 0     O ( c o n v e r t ( b i t , ( [ s t a t u s ] & 2 ) ) ) 0 
   O ( c o n v e r t ( b i t , ( [ s t a t u s ] & 4 ) ) ) 0 
   O ( c o n v e r t ( b i t , ( [ s t a t u s ] & 8 ) ) ) 0       ? ( c o n v e r t ( s m a l l i n t , 0 ) ) 0      ? ( c o n v e r t ( s m a l l i n t , 0 ) ) 0  
   ¹ ( c o n v e r t ( s m a l l i n t , i s n u l l ( c o n v e r t ( b i n a r y ( 2 ) , r e v e r s e ( s u b s t r i n g ( [ f o r k e y s ] , 1 , 2 ) ) ) , 0 ) ) ) VW!0  
   ¹ ( c o n v e r t ( s m a l l i n t , i s n u l l ( c o n v e r t ( b i n a r y ( 2 ) , r e v e r s e ( s u b s t r i n g ( [ f o r k e y s ] , 3 , 2 ) ) ) , 0 ) ) ) 0      ¹ ( c o n v e r t ( s m a l l i n t , i s n u l l ( c o n v e r t ( b i n a r y ( 2 ) , r e v e r s e ( s u b s t r i n g ( [ f o r k e y s ] , 5 , 2 ) ) ) , 0 ) ) ) WW!0  
Rninja

smlogo.gif

 
Have you tried to rename it to .bkp and restore it as a database file?
Thanks

J. Kusch
 
I haven't tried that. How do you do that? Just place the file in the sql directory?

Thanks for the response, sounds like it could work...
Rninja

smlogo.gif

 
No. Try opening up books online (the sql server docs) and looking up the word restore.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top