Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CREATE CURSOR command
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01533423
Message ID:
01533443
Views:
31
>>>>>>>You and Thomas both misunderstood what I meant.
>>>>>>>
>>>>>>>Here is what I wrote
>>>>>>>
>>>>>>>CREATE CURSOR Inventory_Locations (Descrip C(10), ExternalId varchar(50), Id I AUTOINC NEXTVALUE 2 UNIQUE)
>>>>>>
>>>>>>ROFL
>>>>>>Oops!
>>>>>>Sorry.
>>>>>
>>>>>Please see my updated reply as I added 2 more questions. To clarify - I created an Excel with 12 sheets. I now want to insert data from these sheets into cursors and add extra column for Row (I call it ID).
>>>>>
>>>>>I also want to make sure that if I declare columns as C in VFP, I will not be adding trailing spaces to the values which defined as varchar in SQL - just want to make sure.
>>>>
>>>>
>>>>>By the way, will the spaces be automatically dropped when passing the values back to SQL Server if declared as C(50) in
>>>>VFP?
>>>>
>>>>Nope. Spaces will be there.
>>>>BTW I don't know how you update SQL Server table.
>>>
>>>Using SQLExec. So, do you suggest to use varchar then declaring the columns in the cursor?
>>
>>No, just use ALLTRIM() when you update.
>>BTW why you don't want to use varchar?
>
>I'm not yet sure how I will update, but adding alltrim around every field will be cumbersome. May be I'll try varchar instead.

Sure, but make sure that these varchar fields doesn't have trailing spaces also :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform