Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I don't understand.
Message
From
13/08/2003 12:46:04
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
13/08/2003 11:24:24
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00819794
Message ID:
00819840
Views:
13
>Hi,
>
>If i send this with SPT on MSQL:
>
>USE pub
>
>next send:
>
>
>USE Master; SELECT ?par  ; SELECT DB_NAME()
>
>
>VFP ask me par, i put 1.
>On MSQL Profiler i see:
>
>exec sp_executesql N'USE Master; SELECT @P1   ; SELECT DB_NAME()', N'@P1 int', 1
>
>
>Now i send on connection:
>
>SELECT DB_NAME()
>
>
>I get Master !!!!! why ?
>
>But if i send:
>
>USE pub
>
>and
>
>exec sp_executesql N'USE Master; SELECT @P1   ; SELECT DB_NAME()', N'@P1
>
>and
>
>SELECT DB_NAME()
>
>
>I get pub. I aspect this.
>
>Where is VFP trick ?
>
>Thanks

Fabio,
Are you sure second executed w/o any errors ? I actually expected it to return Master and after correcting the code I get Master.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform