Having a table with two datetime columns(date_ & time_. One to store the date and the other to store the time (my client's design).
When I insert a date alone to the date_ column the time defaults to 12:00:00 AM (as expected).
But I have a problem when inserting / updating the time in the time_ column. When i insert the time from my asp application / query analyzer the date defaults to 1900-1-1(expected). When i insert the time from enterprise manager the date defaults to 1899-12-30.
Can anybody explain me why the date defaults to 1899-12-30 in enterprise manager
thanksThe following article explains this in detail:
article (http://www.databasejournal.com/features/mssql/article.php/1494281)
If you need further discussion, let me know and I will give you my 2 cents as to what is occurring.sql
Showing posts with label client. Show all posts
Showing posts with label client. Show all posts
Sunday, March 25, 2012
Saturday, February 25, 2012
Debugging stored procedures in SQL 2000
Please can someone tell me how to get this working. It seems impossible.
I just want to debug my stored procedures remotely, from a client PC.
Surely I don't have to physically sit at the server to debug the stored
procedures?
Owen
http://www.binarybaby.co.uk :: home-made electronic musicCan't you term in?
At our office we use terminal services or remote desktop - of course it
depends on your network setup and permissions. You have to set up the
server to allow such connections as well.
Perhaps you could clarify what your specific situation is network wise.
I just want to debug my stored procedures remotely, from a client PC.
Surely I don't have to physically sit at the server to debug the stored
procedures?
Owen
http://www.binarybaby.co.uk :: home-made electronic musicCan't you term in?
At our office we use terminal services or remote desktop - of course it
depends on your network setup and permissions. You have to set up the
server to allow such connections as well.
Perhaps you could clarify what your specific situation is network wise.
Friday, February 17, 2012
Debug SQL User Functions
Does anyone know if there's a way to debug T-SQL user functions using sql
server 2000 sp3 on Windows Small Business Server 2003 from a client computer
running an Access 2003 mdb front-end on Windows XP SP2?
JayNot directly. You could debug the code if you create it as a procedure inste
ad.
ML|||ML,
I was afraid that would be the answer. The reason I wrote it as a function
is so that I could put it in a server-side query as in: "SELECT
MyFunc(SomeField, @.SomeInputVariable) AS SomeLabel FROM dbo.SomeTable;". Is
there a way to do the same thing with a procedure?
Jay
"ML" wrote:
> Not directly. You could debug the code if you create it as a procedure ins
tead.
>
> ML|||All you need in such a case is a sample of input parameters - for instance i
n
a table variable - and then you execute the code you intend to use in the
function with each set of parameters in a loop.
Or maybe you can post your DDL and get a 'second opinion'.
ML|||Try this out:
declare @.output2 varchar(30)
exec testbysandeep 1,2,@.output1=@.output2 OUTPUT
select @.output2
output1 is the field which is the output of the function. You assign this
value to the output2 variable.Then by doing a select statement you display
the value.
Hope this helps.
jains
"jay" wrote:
> ML,
> I was afraid that would be the answer. The reason I wrote it as a functi
on
> is so that I could put it in a server-side query as in: "SELECT
> MyFunc(SomeField, @.SomeInputVariable) AS SomeLabel FROM dbo.SomeTable;". I
s
> there a way to do the same thing with a procedure?
> Jay
> "ML" wrote:
>|||Hi Jay,
You can debug a UDF from QA by making a small SP that calls the UDF. The QA
debugger steps into the UDF with F11 the same as VS.
Cheers
Doug Forster
"jay" <jay@.discussions.microsoft.com> wrote in message
news:E2A1224F-03FA-4422-BD86-215675844400@.microsoft.com...
> ML,
> I was afraid that would be the answer. The reason I wrote it as a
> function
> is so that I could put it in a server-side query as in: "SELECT
> MyFunc(SomeField, @.SomeInputVariable) AS SomeLabel FROM dbo.SomeTable;".
> Is
> there a way to do the same thing with a procedure?
> Jay
> "ML" wrote:
>|||Hi Doug Forster,
Is there any kind of configuration setting involed at server side ?
With warm regards
Jatinder|||Well I do this ON the server with admin rights and it just works. Maybe
someone else knows if it is possible to debug from another box, though I
notice the docs caution against debugging on a production server.
Cheers
Doug Forster
"jsfromynr" <jatinder.singh@.clovertechnologies.com> wrote in message
news:1122878941.648594.17860@.g47g2000cwa.googlegroups.com...
> Hi Doug Forster,
> Is there any kind of configuration setting involed at server side ?
> With warm regards
> Jatinder
>|||Hi Forster ,
The problem is that it is not working (debuggin) even on Server .
It says that you are logged as 'Local Account' . Do I have to Logon the
service as administrator woul that effect other clients?
With warm regards
Jatinder Singh
Doug Forster wrote:
> Well I do this ON the server with admin rights and it just works. Maybe
> someone else knows if it is possible to debug from another box, though I
> notice the docs caution against debugging on a production server.
> Cheers
> Doug Forster
> "jsfromynr" <jatinder.singh@.clovertechnologies.com> wrote in message
> news:1122878941.648594.17860@.g47g2000cwa.googlegroups.com...|||Hi I just want to add what I am facing when trying to debug a procedure
(created on master DB using sa login)
when I start debugging on this procedure in query analyzer, I recieve a
msg box which says:
SP debugging may not work properly if you log on as 'Local System
account'
while SQL Server is configured to run as a service.
You can open Event Viwer to see details.
Do you want to continue?
When I continue with this and execute this procedure by providing
parameter values, I get the print outputs, but procedure execution
doesn't break on break points!!
I am puzzled now how to work around with this? How can I break
execution on break points?
Thanks
server 2000 sp3 on Windows Small Business Server 2003 from a client computer
running an Access 2003 mdb front-end on Windows XP SP2?
JayNot directly. You could debug the code if you create it as a procedure inste
ad.
ML|||ML,
I was afraid that would be the answer. The reason I wrote it as a function
is so that I could put it in a server-side query as in: "SELECT
MyFunc(SomeField, @.SomeInputVariable) AS SomeLabel FROM dbo.SomeTable;". Is
there a way to do the same thing with a procedure?
Jay
"ML" wrote:
> Not directly. You could debug the code if you create it as a procedure ins
tead.
>
> ML|||All you need in such a case is a sample of input parameters - for instance i
n
a table variable - and then you execute the code you intend to use in the
function with each set of parameters in a loop.
Or maybe you can post your DDL and get a 'second opinion'.
ML|||Try this out:
declare @.output2 varchar(30)
exec testbysandeep 1,2,@.output1=@.output2 OUTPUT
select @.output2
output1 is the field which is the output of the function. You assign this
value to the output2 variable.Then by doing a select statement you display
the value.
Hope this helps.
jains
"jay" wrote:
> ML,
> I was afraid that would be the answer. The reason I wrote it as a functi
on
> is so that I could put it in a server-side query as in: "SELECT
> MyFunc(SomeField, @.SomeInputVariable) AS SomeLabel FROM dbo.SomeTable;". I
s
> there a way to do the same thing with a procedure?
> Jay
> "ML" wrote:
>|||Hi Jay,
You can debug a UDF from QA by making a small SP that calls the UDF. The QA
debugger steps into the UDF with F11 the same as VS.
Cheers
Doug Forster
"jay" <jay@.discussions.microsoft.com> wrote in message
news:E2A1224F-03FA-4422-BD86-215675844400@.microsoft.com...
> ML,
> I was afraid that would be the answer. The reason I wrote it as a
> function
> is so that I could put it in a server-side query as in: "SELECT
> MyFunc(SomeField, @.SomeInputVariable) AS SomeLabel FROM dbo.SomeTable;".
> Is
> there a way to do the same thing with a procedure?
> Jay
> "ML" wrote:
>|||Hi Doug Forster,
Is there any kind of configuration setting involed at server side ?
With warm regards
Jatinder|||Well I do this ON the server with admin rights and it just works. Maybe
someone else knows if it is possible to debug from another box, though I
notice the docs caution against debugging on a production server.
Cheers
Doug Forster
"jsfromynr" <jatinder.singh@.clovertechnologies.com> wrote in message
news:1122878941.648594.17860@.g47g2000cwa.googlegroups.com...
> Hi Doug Forster,
> Is there any kind of configuration setting involed at server side ?
> With warm regards
> Jatinder
>|||Hi Forster ,
The problem is that it is not working (debuggin) even on Server .
It says that you are logged as 'Local Account' . Do I have to Logon the
service as administrator woul that effect other clients?
With warm regards
Jatinder Singh
Doug Forster wrote:
> Well I do this ON the server with admin rights and it just works. Maybe
> someone else knows if it is possible to debug from another box, though I
> notice the docs caution against debugging on a production server.
> Cheers
> Doug Forster
> "jsfromynr" <jatinder.singh@.clovertechnologies.com> wrote in message
> news:1122878941.648594.17860@.g47g2000cwa.googlegroups.com...|||Hi I just want to add what I am facing when trying to debug a procedure
(created on master DB using sa login)
when I start debugging on this procedure in query analyzer, I recieve a
msg box which says:
SP debugging may not work properly if you log on as 'Local System
account'
while SQL Server is configured to run as a service.
You can open Event Viwer to see details.
Do you want to continue?
When I continue with this and execute this procedure by providing
parameter values, I get the print outputs, but procedure execution
doesn't break on break points!!
I am puzzled now how to work around with this? How can I break
execution on break points?
Thanks
Debug sp in Query Analyzer
Hi all,
Is it possible to debug sp in client workstation by using sql query
analyzer? how?
It's only work to me when debug sp in the SQL server by using sql query
analyzer
Thanks in advance!!
MartinNo it is possible only from Query Analyser
Madhivanan|||it means that the Query Analyser and the SQL server must be within the same
machine, rite?
"Madhivanan" <madhivanan2001@.gmail.com> wrote in message
news:1122472249.786547.271590@.z14g2000cwz.googlegroups.com...
> No it is possible only from Query Analyser
> Madhivanan
>|||Yes
Madhivanan|||thx!
"Madhivanan" <madhivanan2001@.gmail.com> wrote in message
news:1122476462.825295.300700@.z14g2000cwz.googlegroups.com...
> Yes
> Madhivanan
>|||No - you can have Query Analyzer on one machine, and the SQL server instance
on another machine, and still debug a stored procedure (I just debugged a
stored procedure on our development server from my own workstation to verify
this). You do need to have the SQL Server properly configured, but Query
Analyzer does not need to be run from the same machine as the SQL server
instance.
"Atenza" <Atenza@.mail.hongkong.com> wrote in message
news:ufjA2ZrkFHA.3436@.tk2msftngp13.phx.gbl...
> it means that the Query Analyser and the SQL server must be within the
same
> machine, rite?
>
> "Madhivanan" <madhivanan2001@.gmail.com> wrote in message
> news:1122472249.786547.271590@.z14g2000cwz.googlegroups.com...
>|||what do you mean by: 'You do need to have the SQL Server properly configured
,
but Query Analyzer does not need to be run from the same machine as the SQL
server instance.'? What do I need to configure differently on the sql serve
r
so that developers can use the debug feature from their work stations?
"Jeremy Williams" wrote:
> No - you can have Query Analyzer on one machine, and the SQL server instan
ce
> on another machine, and still debug a stored procedure (I just debugged a
> stored procedure on our development server from my own workstation to veri
fy
> this). You do need to have the SQL Server properly configured, but Query
> Analyzer does not need to be run from the same machine as the SQL server
> instance.
> "Atenza" <Atenza@.mail.hongkong.com> wrote in message
> news:ufjA2ZrkFHA.3436@.tk2msftngp13.phx.gbl...
> same
>
>
Is it possible to debug sp in client workstation by using sql query
analyzer? how?
It's only work to me when debug sp in the SQL server by using sql query
analyzer
Thanks in advance!!
MartinNo it is possible only from Query Analyser
Madhivanan|||it means that the Query Analyser and the SQL server must be within the same
machine, rite?
"Madhivanan" <madhivanan2001@.gmail.com> wrote in message
news:1122472249.786547.271590@.z14g2000cwz.googlegroups.com...
> No it is possible only from Query Analyser
> Madhivanan
>|||Yes
Madhivanan|||thx!
"Madhivanan" <madhivanan2001@.gmail.com> wrote in message
news:1122476462.825295.300700@.z14g2000cwz.googlegroups.com...
> Yes
> Madhivanan
>|||No - you can have Query Analyzer on one machine, and the SQL server instance
on another machine, and still debug a stored procedure (I just debugged a
stored procedure on our development server from my own workstation to verify
this). You do need to have the SQL Server properly configured, but Query
Analyzer does not need to be run from the same machine as the SQL server
instance.
"Atenza" <Atenza@.mail.hongkong.com> wrote in message
news:ufjA2ZrkFHA.3436@.tk2msftngp13.phx.gbl...
> it means that the Query Analyser and the SQL server must be within the
same
> machine, rite?
>
> "Madhivanan" <madhivanan2001@.gmail.com> wrote in message
> news:1122472249.786547.271590@.z14g2000cwz.googlegroups.com...
>|||what do you mean by: 'You do need to have the SQL Server properly configured
,
but Query Analyzer does not need to be run from the same machine as the SQL
server instance.'? What do I need to configure differently on the sql serve
r
so that developers can use the debug feature from their work stations?
"Jeremy Williams" wrote:
> No - you can have Query Analyzer on one machine, and the SQL server instan
ce
> on another machine, and still debug a stored procedure (I just debugged a
> stored procedure on our development server from my own workstation to veri
fy
> this). You do need to have the SQL Server properly configured, but Query
> Analyzer does not need to be run from the same machine as the SQL server
> instance.
> "Atenza" <Atenza@.mail.hongkong.com> wrote in message
> news:ufjA2ZrkFHA.3436@.tk2msftngp13.phx.gbl...
> same
>
>
Subscribe to:
Posts (Atom)