1
Answer

Cannot find either column "dbo" or the user-defined function or aggregate "dbo.fnMinValue", or the name is ambiguous

syed afroz

syed afroz

14y
10.9k
1
Hi!

I've created a UDF to find the min of two integer values as

CREATE FUNCTION dbo.fnMinValue
               (@ColumnA MONEY,
                @ColumnB MONEY)
RETURNS MONEY
AS
  BEGIN
    RETURN (0.5 * ((@ColumnA + @ColumnB) - abs(@ColumnA - @ColumnB)))
  END

and I'm calling this UDF in folloeing format

SELECT cast(dbo.fnMinValue ( @lcount,@Rcount) as int)

when i execute this in server it gives the following error

Cannot find either column "dbo" or the user-defined function or aggregate "dbo.fnMinValue", or the name is ambiguous.

Plz help me out..

Answers (1)
0
Kunal Vaishya
NA 4.1k 266.1k 12y

Attachment moviedb.zip

0
Waqas Ali
NA 19 19.4k 12y
Thanks,
Can you tell me how to use this command with a textbox

regionTableAdapter.Insert(5, "NorthWestern");

can i write textbox1.text, textbox2.text instead of 5 and Northwestern. I tried it but it gave me error( I was explicitly converting the textboxes to int32)

????
0
Satyapriya Nayak
NA 53k 8m 12y
Hi Waqas,

Please refer the below links

http://www.c-sharpcorner.com/uploadfile/mimrantaj/connect-to-access-database-in-C-Sharp-and-ado-net/

http://msdn.microsoft.com/en-us/library/aa288452%28v=vs.71%29.aspx

http://www.codeproject.com/Articles/24043/Simple-Movie-Database-in-C-using-Microsoft-Access

Thanks