Showing posts with label registry. Show all posts
Showing posts with label registry. Show all posts

Monday, March 12, 2012

osql.exe

Is there some registry key that tell me if and where osql.exe is lcoated?
--
Sincerely
Andrea Morohi Andrea,
"Andrea Moro" <moroandreaET@.tiscalinet.it> ha scritto nel messaggio
news:%23JY7YyJcDHA.616@.TK2MSFTNGP11.phx.gbl...
> Is there some registry key that tell me if and where osql.exe is lcoated?
have a look at HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\80\
SharedCode key which should point to
c:\program files\Microsor SQL Server\80\Tools\
or HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\80\Tools\ClientSetup
SQLPAth key which should point to
c:\program files\Microsor SQL Server\80\Tools\
just consider oSql.exe resides in the Binn subfoler...
hth
Andrea Montanari
andrea.sql@.virgilio.it
montanari_andrea@.virgilio.it
http://www.asql.biz/DbaMgr.shtm
DbaMgr2k ver 0.4.0 - DbaMgr ver 0.50.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply|||Refer to this url
http://www.vb2themax.com/Item.asp?PageID=CodeBank&ID=688
--
-Vishal
"Andrea Moro" <moroandreaET@.tiscalinet.it> wrote in message
news:#JY7YyJcDHA.616@.TK2MSFTNGP11.phx.gbl...
> Is there some registry key that tell me if and where osql.exe is lcoated?
> --
> Sincerely
> Andrea Moro
>|||with t-sql you can have something like this:
create table #test (value varchar(500), data varchar(500))
nsert into #test
exec master..xp_regread N'HKEY_LOCAL_MACHINE',N'SOFTWARE\Microsoft\Microsoft
SQL Server\80\Tools\ClientSetup', N'SQLPath'
select data + '\bin' as 'osql_path' from #test
--
-Vishal
"Vishal Parkar" <vgparkar@.hotmail.com> wrote in message
news:e0ysoXKcDHA.2688@.TK2MSFTNGP11.phx.gbl...
> Refer to this url
> http://www.vb2themax.com/Item.asp?PageID=CodeBank&ID=688
> --
> -Vishal
> "Andrea Moro" <moroandreaET@.tiscalinet.it> wrote in message
> news:#JY7YyJcDHA.616@.TK2MSFTNGP11.phx.gbl...
> > Is there some registry key that tell me if and where osql.exe is
lcoated?
> >
> > --
> > Sincerely
> > Andrea Moro
> >
> >
>

Friday, March 9, 2012

OSQL Unicode Insert of ^F (Hex 06) from Registry Multi-String Value is Duplicating in DB

I'm using a Unicode sql script imported using OSQL. One of the values
we are attempting to insert is a Registry Multi-String value by passing
a string to a stored procedure. These Multi-String values appear to be
delimited by a Hex 06 (^F) character. When I import this character,
embedded in a string preceeded by an N, i.e

N'something something2 something3'

I end up with TWO of this character in the db. I get :

something something2 something3

Any help figuring out why or how to fix this? We MUST use Unicode due
to extended character sets, so NOT using Unicode is NOT a solution.Seems to be an encoding issue. We are using SQLXML to retrieve the
data initially. That seems to be UTF-8 encoding the data which creates
an xml stream that contains an odd escape sequence. This escape
sequence is not then being translated into the correct unicode
representation in the insert scripts (which are created by transforming
the xml). We are going to try Unicode encoding on the SQLXmlCommand
object and setting the xml to encoding=UTF-16 to see what happens.