Friday, March 30, 2012
How can I retrieve a function return value from an executed string?
Suppose that I have the name of an UDF (@.Function) which returns an scalar value and accepts just one parameter. How can I execute and assign the return value to a variable?
I tried the following, but it did not work:
declare @.Receptor as sql_variant
set @.Receptor=execute('select ' + @.Function + '(10)')
Thanks a lot in advance.The function is not completely qualified (DB name, owner)
Try:
declare @.Receptor as sql_variant
set @.Receptor = database_name.dbo.Function(@.in_param_value)
A user defined function can be used like any other pre-defined function
Originally posted by EMoscosoCam
Hello!
Suppose that I have the name of an UDF (@.Function) which returns an scalar value and accepts just one parameter. How can I execute and assign the return value to a variable?
I tried the following, but it did not work:
declare @.Receptor as sql_variant
set @.Receptor=execute('select ' + @.Function + '(10)')
Thanks a lot in advance.sql
How can I restore the db successfully
I use the Restore Database function in the Entreprise Manager to restore a database. But I have no idea about why it prompt error when I click OK and say :
Cannot find file ID 2 on device c:\Program File\Microsoft SQL Server\MSSQL\BACKUP\abc'. RESTORE DATABASE is terminating abnormally.
On the other hand, if I have a backup database file from someone, how can I restore it in the normal way.
1st Step: New a Database (no change to the setting)
2nd Step: Right click DB->Restore Database-> but how can I choose the backup database file that someone give me.?
Best regards,
Grace
Hi,
How can I choose the backup database file that someone give me.?
In the Restore databaase window -- Select the option button "From Device" ,
Click the "Select Device" -- Click "Add"
and in the file name get the .BAK file from the directory and click "OK".
There you select Backup Number "View contents" . This
will show you all the files associated with the backup file.
If you have mutiple files select the one you require and click "OK" to
restore.
Cannot find file ID 2 on device c: ?
I feel that this Backup is taken in mutiple files (Devices) and you have
only one file. In that case you cant restore till u get the other file.
Thanks
Hari
MCDBA
"Grace" <anonymous@.discussions.microsoft.com> wrote in message
news:17BBF6CC-AC73-44FE-A31D-AE0848ED7B83@.microsoft.com...
> I'm a new user to SQL Server.
> I use the Restore Database function in the Entreprise Manager to restore a
database. But I have no idea about why it prompt error when I click OK and
say :
> Cannot find file ID 2 on device c:\Program File\Microsoft SQL
Server\MSSQL\BACKUP\abc'. RESTORE DATABASE is terminating abnormally.
> On the other hand, if I have a backup database file from someone, how can
I restore it in the normal way.
> 1st Step: New a Database (no change to the setting)
> 2nd Step: Right click DB->Restore Database-> but how can I choose the
backup database file that someone give me.?
> Best regards,
> Grace
|||Grace,
The restore dialog in EM can use the backup history produced when you took the backup. But that doesn't
necessarily reflect what you actually have on the backup files. In this case, it seems like the backup history
say that there should be at least two backups on the backup file, and there isn't. Perhaps the backup file
doesn't exist at all...
If you want to restore a backup for a database which doesn't exists, *do not* create the database first. If
you do, you will most probably not create it with the same file structure as you had when you took the backup.
Let the restore process create the database for you. Just enter the restore dialog, type in the database name,
and select "from device". Here you can specify the backup file from which you want to do the restore.
I strongly suggest you read about how backup and restore work in Books Online, without that knowledge, you
might find above a bit difficult to understand. Also, I find it easier to work with the BACKUP and RESTORE
commands from Query Analyzer instead of using a GUI like EM. At least until you have good understanding about
the architecture of backup and restore and then understand more of how it work and what EM does when you
select options in the GUI. Just my opinion, that is...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Grace" <anonymous@.discussions.microsoft.com> wrote in message
news:17BBF6CC-AC73-44FE-A31D-AE0848ED7B83@.microsoft.com...
> I'm a new user to SQL Server.
> I use the Restore Database function in the Entreprise Manager to restore a database. But I have no idea
about why it prompt error when I click OK and say :
> Cannot find file ID 2 on device c:\Program File\Microsoft SQL Server\MSSQL\BACKUP\abc'. RESTORE DATABASE
is terminating abnormally.
> On the other hand, if I have a backup database file from someone, how can I restore it in the normal way.
> 1st Step: New a Database (no change to the setting)
> 2nd Step: Right click DB->Restore Database-> but how can I choose the backup database file that someone give
me.?
> Best regards,
> Grace
|||You are trying to restore from database, which uses the history of backups. The history path is different from the path of the file on the disk you are trying to restore from.
To restore from the file you have, you should click the bullet marked device (change from database) and browse to the actual file system file you are trying to restore the database to(via select devices... then Add...button).
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Wednesday, March 28, 2012
how can I read a table value every minute
I was wondering if there is any function by which I can read the value in a
date field every minute or so to check to see if it has been updated.
In MS Access I would have done this using the timer function but I wonder if
there is an equivalent in MSDE.
Thanks
June
hi June,
"June Macleod" <junework@.hotmail.com> ha scritto nel messaggio
news:OrxlWq4gEHA.632@.TK2MSFTNGP12.phx.gbl...
> Hi
> I was wondering if there is any function by which I can read the value in
a
> date field every minute or so to check to see if it has been updated.
> In MS Access I would have done this using the timer function but I wonder
if
> there is an equivalent in MSDE.
>
MSDE provides access to the SQL Server Agent, a native scheduler which can
be used to execute maintanance jobs, execute Transact SQL staments, run
stored procedures...
perhaps you can use it... server side... instaead of a client timer...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||June,
Depending on what you are up to, you might find the WAITFOR command useful.
Russell Fields
"June Macleod" <junework@.hotmail.com> wrote in message
news:OrxlWq4gEHA.632@.TK2MSFTNGP12.phx.gbl...
> Hi
> I was wondering if there is any function by which I can read the value in
a
> date field every minute or so to check to see if it has been updated.
> In MS Access I would have done this using the timer function but I wonder
if
> there is an equivalent in MSDE.
> Thanks
> June
>
Wednesday, March 21, 2012
How can I obtain the login name of the caller of my UDF written in a CLR language?
Is there a way to obtain the login name of the caller of my user
defined function implement in managed C++?
I know I can get the information using the code segment below but I
want to avoid connecting back to the database for performance reasons.
String^ queryString = "select suser_sname()"
SqlConnection conn = gcnew SqlConnection(connectionString);
SqlCommand command = new SqlCommand(queryString, connection);
conn.Open();
SqlDataReader reader =
command.ExecuteReader(CommandBehavior.CloseConnect ion);
while (reader.Read())
{
reader[0];
}
Thanks,
Steven
Examine using the Security object.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"smaully" <smauldin@.ingrian.com> wrote in message
news:1160176423.328986.327470@.i42g2000cwa.googlegr oups.com...
>I am using MS SQL Server 2005.
> Is there a way to obtain the login name of the caller of my user
> defined function implement in managed C++?
> I know I can get the information using the code segment below but I
> want to avoid connecting back to the database for performance reasons.
> String^ queryString = "select suser_sname()"
> SqlConnection conn = gcnew SqlConnection(connectionString);
> SqlCommand command = new SqlCommand(queryString, connection);
> conn.Open();
> SqlDataReader reader =
> command.ExecuteReader(CommandBehavior.CloseConnect ion);
> while (reader.Read())
> {
> reader[0];
> }
> Thanks,
> Steven
>
|||Darn Spell Checker.
Look into the SecurityPrinicipal object.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:uBNLaka6GHA.4620@.TK2MSFTNGP02.phx.gbl...
> Examine using the Security object.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "smaully" <smauldin@.ingrian.com> wrote in message
> news:1160176423.328986.327470@.i42g2000cwa.googlegr oups.com...
>
|||Arnie,
That will return the Windows user not the sql login.
-Steve
|||I read that that is what you desired; "obtain the login name of the caller".
There was nothing to indicate you were using SQL Logins.
Since that is know to and in SQL Server, and not known to the client
application, the only way is to ask SQL Server to provide it. That may
require a 'wasted' round trip. You might call a stored procedure, have the
stored procedure call the UDF, and pass the SQL Login back as a output
parameter.
Of course, I don't know how you are using the UDF, so that may not work for
you.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"smaully" <smauldin@.ingrian.com> wrote in message
news:1160415121.924478.80610@.m7g2000cwm.googlegrou ps.com...
> Arnie,
> That will return the Windows user not the sql login.
> -Steve
>
How can I obtain the login name of the caller of my UDF written in a CLR language?
Is there a way to obtain the login name of the caller of my user
defined function implement in managed C++?
I know I can get the information using the code segment below but I
want to avoid connecting back to the database for performance reasons.
String^ queryString = "select suser_sname()"
SqlConnection conn = gcnew SqlConnection(connectionString);
SqlCommand command = new SqlCommand(queryString, connection);
conn.Open();
SqlDataReader reader =
command.ExecuteReader(CommandBehavior.CloseConnection);
while (reader.Read())
{
reader[0];
}
Thanks,
StevenExamine using the Security object.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"smaully" <smauldin@.ingrian.com> wrote in message
news:1160176423.328986.327470@.i42g2000cwa.googlegroups.com...
>I am using MS SQL Server 2005.
> Is there a way to obtain the login name of the caller of my user
> defined function implement in managed C++?
> I know I can get the information using the code segment below but I
> want to avoid connecting back to the database for performance reasons.
> String^ queryString = "select suser_sname()"
> SqlConnection conn = gcnew SqlConnection(connectionString);
> SqlCommand command = new SqlCommand(queryString, connection);
> conn.Open();
> SqlDataReader reader =
> command.ExecuteReader(CommandBehavior.CloseConnection);
> while (reader.Read())
> {
> reader[0];
> }
> Thanks,
> Steven
>|||Darn Spell Checker.
Look into the SecurityPrinicipal object.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:uBNLaka6GHA.4620@.TK2MSFTNGP02.phx.gbl...
> Examine using the Security object.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "smaully" <smauldin@.ingrian.com> wrote in message
> news:1160176423.328986.327470@.i42g2000cwa.googlegroups.com...
>|||Arnie,
That will return the Windows user not the sql login.
-Steve|||I read that that is what you desired; "obtain the login name of the caller".
There was nothing to indicate you were using SQL Logins.
Since that is know to and in SQL Server, and not known to the client
application, the only way is to ask SQL Server to provide it. That may
require a 'wasted' round trip. You might call a stored procedure, have the
stored procedure call the UDF, and pass the SQL Login back as a output
parameter.
Of course, I don't know how you are using the UDF, so that may not work for
you.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"smaully" <smauldin@.ingrian.com> wrote in message
news:1160415121.924478.80610@.m7g2000cwm.googlegroups.com...
> Arnie,
> That will return the Windows user not the sql login.
> -Steve
>
How can I obtain the login name of the caller of my UDF written in a CLR language?
Is there a way to obtain the login name of the caller of my user
defined function implement in managed C++?
I know I can get the information using the code segment below but I
want to avoid connecting back to the database for performance reasons.
String^ queryString = "select suser_sname()"
SqlConnection conn = gcnew SqlConnection(connectionString);
SqlCommand command = new SqlCommand(queryString, connection);
conn.Open();
SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
while (reader.Read())
{
reader[0];
}
Thanks,
StevenExamine using the Security object.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"smaully" <smauldin@.ingrian.com> wrote in message
news:1160176423.328986.327470@.i42g2000cwa.googlegroups.com...
>I am using MS SQL Server 2005.
> Is there a way to obtain the login name of the caller of my user
> defined function implement in managed C++?
> I know I can get the information using the code segment below but I
> want to avoid connecting back to the database for performance reasons.
> String^ queryString = "select suser_sname()"
> SqlConnection conn = gcnew SqlConnection(connectionString);
> SqlCommand command = new SqlCommand(queryString, connection);
> conn.Open();
> SqlDataReader reader => command.ExecuteReader(CommandBehavior.CloseConnection);
> while (reader.Read())
> {
> reader[0];
> }
> Thanks,
> Steven
>|||Darn Spell Checker.
Look into the SecurityPrinicipal object.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:uBNLaka6GHA.4620@.TK2MSFTNGP02.phx.gbl...
> Examine using the Security object.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "smaully" <smauldin@.ingrian.com> wrote in message
> news:1160176423.328986.327470@.i42g2000cwa.googlegroups.com...
>>I am using MS SQL Server 2005.
>> Is there a way to obtain the login name of the caller of my user
>> defined function implement in managed C++?
>> I know I can get the information using the code segment below but I
>> want to avoid connecting back to the database for performance reasons.
>> String^ queryString = "select suser_sname()"
>> SqlConnection conn = gcnew SqlConnection(connectionString);
>> SqlCommand command = new SqlCommand(queryString, connection);
>> conn.Open();
>> SqlDataReader reader =>> command.ExecuteReader(CommandBehavior.CloseConnection);
>> while (reader.Read())
>> {
>> reader[0];
>> }
>> Thanks,
>> Steven
>|||Arnie,
That will return the Windows user not the sql login.
-Steve|||I read that that is what you desired; "obtain the login name of the caller".
There was nothing to indicate you were using SQL Logins.
Since that is know to and in SQL Server, and not known to the client
application, the only way is to ask SQL Server to provide it. That may
require a 'wasted' round trip. You might call a stored procedure, have the
stored procedure call the UDF, and pass the SQL Login back as a output
parameter.
Of course, I don't know how you are using the UDF, so that may not work for
you.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"smaully" <smauldin@.ingrian.com> wrote in message
news:1160415121.924478.80610@.m7g2000cwm.googlegroups.com...
> Arnie,
> That will return the Windows user not the sql login.
> -Steve
>
Wednesday, March 7, 2012
How can i get XML using a Dynamic Query ?
i have a function like this, but i alwasys says wrong:
alter function GROUP_CONCAT(@.tableName varchar(100),@.groupByColumn varchar(100),@.targetColumn varchar(100),@.targetValue varchar(100))
returns varchar(1000)
as
begin
declare @.back varchar(1000)
declare @.sql varchar(1000)
set @.sql = 'select '+@.targetColumn+' from ' + @.tableName + ' where '+@.groupByColumn + ' = '''+@.targetValue + ''' for xml auto, root(''root'')'
declare @.x xml
set @.x = exec(@.sql)
return @.sql
end
I want to generate XML using a exec(...) , that is a Dynamic Query, but SQL Server 2005 always say something wrong with exec(....)
How can i fix it? Thanks
The reason is that you cannot use exec() as an expression. It is a statement that cannot be assigned.
If you just want to return it over TDS, do not assign it to a variable, otherwise assign it to a temp table inside the constructed node and then retrieve it from there.
Also, if you assign the FOR XML to a column or variable of type XML, it is better to add the type directive to the FOR XML as in FOR XML PATH, TYPE, ROOT('root'). That avoids unnecessary parsing.
Best regards
Michael
Monday, February 27, 2012
How can I get this function be working?
How can I get this function be working?
CREATE FUNCTION MyFunc
(
@.MyDate as datetime,
@.MyTableName varchar(50),
)
RETURNS TABLE
AS
RETURN
SELECT * FROM @.MyTableName Where myDate=@.MyDate
? You can't -- passing a table name dynamically would require dynamic SQL, and dynamic SQL is not supported in UDFs... Why do you want to pass a table name dynamically, anyway? -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <JIM.H.@.discussions.microsoft.com> wrote in message news:d565e7f4-4b5a-4e7f-989d-3e6299fbda2c@.discussions.microsoft.com... How can I get this function be working? CREATE FUNCTION MyFunc ( @.MyDate as datetime, @.MyTableName varchar(50), ) RETURNS TABLE AS RETURN SELECT * FROM @.MyTableName Where myDate=@.MyDate|||
Ok. Thanks for the reply.
I am trying to deal with many tables with different column names. Is there any way I can keep the result set if the following command and perform some other sql command on it?
EXECUTE sp_executesql @.SQLSelectString
-- forward the result set in a table so that other procedures can read it.
|||? There are a few methods. I recommend that you read the following article: http://www.sommarskog.se/share_data.html -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <JIM.H.@.discussions.microsoft.com> wrote in message news:f9f7fbde-732a-43bf-a322-001a6f668f95@.discussions.microsoft.com... Ok. Thanks for the reply. I am trying to deal with many tables with different column names. Is there any way I can keep the result set if the following command and perform some other sql command on it? EXECUTE sp_executesql @.SQLSelectString -- forward the result set in a table so that other procedures can read it.
How can I get this function be working?
How can I get this function be working?
CREATE FUNCTION MyFunc
(
@.MyDate as datetime,
@.MyTableName varchar(50),
)
RETURNS TABLE
AS
RETURN
SELECT * FROM @.MyTableName Where myDate=@.MyDate
Can you describeexactly what your problem is andexactly where you are trying to use the function. Are you getting error messages? If so, show them.
My guess is that the problem is you are trying to use a parameter as the table name. You cannot do that.
|||Ok. Thanks for the reply.
I am trying to deal with many tables with different column names. Is there any way I can keep the result set if the following command and perform some other sql command on it?
EXECUTE sp_executesql @.SQLSelectString
-- forward the result set in a table so that other procedures can read it.
How can I get the mssqlserver status ?
[Running/Stopping/Stopped/...]?
API OpenSCManager/OpenService...?
But it seems these function does not work in win98?
And I don;t want to use DMO or WMI
And how can I know whether a specified database is currently in use?
Please help me ,thank youQ1 How can I get the sql server/msde running status?Running/Stopping/Stopped/...?
Q2 And how can I know whether a specified database is currently in use?
A1 On NT 3.x, 4.x, Win 2k, XP, and later one may poll for a list of currently running services e.g.(Net start). On Win Me, 9x and below generally there is not a service implementation per se (generally one would need to poll running processes).
A2 One may check the dbname column of the result set returned by:
exec sp_Who|||thank you|||You can use the SQL-SCM api (however, conflicting documentation exists that it does not work for 2000 even though it is documentated with 2000). Also, you can use the scm.exe utility.|||Originally posted by rnealejr
You can use the SQL-SCM api (however, conflicting documentation exists that it does not work for 2000 even though it is documentated with 2000). Also, you can use the scm.exe utility.
Hello,rnealejr
thank you for your reply
My database is MSDE, I want to find some API that can work under both 2000 and 98.Could you please tell me the API and dll?(I don't want DMO or WMI).I can know SQLServer whether is running through scm -action 3. But how can I get return state in program?
Thank you again|||I believe the dll is named W95scm.dll under the binn directory. There is a header file and library file as well. Which version of sql server are you using ?|||Scm.exe (and the related API) should be easier and more direct to use to ascertain the DBMS operational state. For some reason, I didn't think about the service control manager, (I'm not sure scm supports Sql Server 6.x and earlier installs, but that is not an issue using MSDE).
Friday, February 24, 2012
How can i get the first day of the month and the last day of the month?
CREATE FUNCTION FirstDayofMonth
(
@.InputDate DATETIME
)
RETURNS DateTime
AS
BEGIN
RETURN (SELECT LEFT(CONVERT(VARCHAR(10),@.Inputdate,112),6) + '01')
END
GO
SELECT dbo.FirstdayofMonth(GETDATE())
CREATE FUNCTION LastDayofMonth
(
@.InputDate DATETIME
)
RETURNS DateTime
AS
BEGIN
RETURN (SELECT DATEADD(dd,-1,DATEADD(mm,+1,LEFT(CONVERT(VARCHAR(10),@.InputDate,112),6) + '01')))
END
GO
SELECT dbo.LastDayofMonth(GETDATE())
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||You can write scalar UDFs to do this like Jens showed. But if you need more functionality like determining holidays, different week numbers, tracking different calendars (fiscal, financial...) etc it is easier to build a static calendar table that contains all the dates. You can them simply query the calendar table to get the necessary information. This is a common approach in data warehousing environment to create a date or calendar dimension.|||As good start to read for that is:http://www.aspfaq.com/show.asp?id=2519
HTH; jens Suessmeyer.
http://www.sqlserver2005.de
|||select dateadd(month, datediff(month, 0, getdate()), 0) as [First Day of the Month],
dateadd(month, datediff(month, 0, getdate()), -1) as [Last Day of the Month]|||I think that wont give the proper results, a slight change will help
select dateadd(month, datediff(month, 0, getdate()), 0) as [First Day of the Month],
dateadd(month, datediff(month, -1, getdate()), -1) as [Last Day of the Month]
How can I get current year in the user defined function.
I have a user defined function in datebase SQL 2000.
function looks like
create function Getcurrentdate
(@.month int, @.day int) returns smalldatetime
begin
declare date1 as smalldatetime
--get current year
--convert month, day and year into current date. then return
return date1
end
my problem was , after using getDate(). I get error meassage which is "can'not use getDate() inside user function"
How can I get current year in the user defined function. Thanks
|||
Hi
Here is another option a UDF doing time interval in SQL Server, I am assuming you know SmallDateTime will not give you seconds because of limited resolution. Hope this helps.
http://www.novicksoftware.com/UDFofWeek/Vol1/T-SQL-UDF-Volume-1-Number-38-udf_DT_AddTime.htm
|||Thanks, you guys. it's helpfulSunday, February 19, 2012
How can i find the exact error line ?
Hi all,
i have an insert function using stored procedure with parameters. At some point while assigning parameters i make a casting problem but all i get is:
String was not recognized as a valid Boolean.
how can i find the exact line causing the error?
thank you
-shane
can you post the code? Perhaps you are passing some incompatible value for a boolean type parameter?|||It's listed in the stack trace that follows that message you pasted here. If you stopped the program in VS 2005, tell it to continue executing, and you'll see it on the HTML page.|||I m using vs 2003 and in the stack tree there is no explanation about it. i found the problem , i was trying to compare a posted radiobutton list item value (which is 0 or 1) with 0 and 1 wihtout knowing radiobutton values were sent as string. i got teh error message because i was going like :if request("rblcontrol') then
do this...
end if
The problem is; i dont get the line that was causing the problem. And this is what i was looking for. You find the prblem this way or that way, maybe after several hours, but is there a way to get the exact line number that is causing hte problem. Stack tree doesnt give me this, if it would i woulnt ask this question. I tried debugging but i m not getting the error while debugging either. its just happening at the end without giving me any clue of whats causing the problem.
Any ideas/
thank you
-shane|||Usually it will tell you in vs or in a webpage the error with the exact page as long as the page was run on the local computer. Did you end up casting the value to boolean?|||
Once again, my problem isnt with the page. Of course i m getting the error in the page it occurs. The problem is the line that causes the problem.
I am gettng ar error in abc.aspx but the only thing i get is generic error message. For some cases i get the line number, usually for the casting problems i never get the line number. Its taking for ever to find which line causes the problem because sometimes everthing looks so right.
-shane
|||You're not being clear. Which line number? In your .aspxpage, in your code-behind page, or in your stored procedure?
Could you possibly show the part of the code casuing trouble and the exact copy-and-paste of the error screen?