|
-
Jul 17th, 2009, 02:28 AM
#1
Thread Starter
Lively Member
Call functions from stored procedured.
I heard 3 tier architect. But i dont know how can i call procedures from back end layer.
please give me a simple example.
Thanks.
-
Jul 17th, 2009, 02:41 AM
#2
Re: Call functions from stored procedured.
Are you asking how your database executes methods in your VB code? The answer is that it doesn't, no matter the architecture. Your data access layer executes stored procedures and the database returns the results. That's it.
-
Jul 17th, 2009, 02:45 AM
#3
Thread Starter
Lively Member
Re: Call functions from stored procedured.
 Originally Posted by jmcilhinney
Are you asking how your database executes methods in your VB code? The answer is that it doesn't, no matter the architecture. Your data access layer executes stored procedures and the database returns the results. That's it.
Thanks for reply.
Yes i want call those results in my application. How can i do that ?
I mean example. i write interface part. i want call all results which written in back end layer.
-
Jul 17th, 2009, 02:51 AM
#4
Re: Call functions from stored procedured.
I'm not sure what you're actually asking for. Are you saying that you don't know how to query the database from your application? If so then you should follow the DB FAQ link in my signature and avail yourself of some of the resources it links to.
-
Jul 17th, 2009, 02:59 AM
#5
Thread Starter
Lively Member
Re: Call functions from stored procedured.
 Originally Posted by jmcilhinney
I'm not sure what you're actually asking for. Are you saying that you don't know how to query the database from your application? If so then you should follow the DB FAQ link in my signature and avail yourself of some of the resources it links to.
I mean, i want to call functions which writen in sql. I know they populate in stored procedured of sql.
-
Jul 17th, 2009, 04:18 AM
#6
Re: Call functions from stored procedured.
Are you saying that you want to call a database function from a database stored procedure, or that you want to call a database function direct from your VB code?
-
Jul 17th, 2009, 04:22 AM
#7
Thread Starter
Lively Member
Re: Call functions from stored procedured.
 Originally Posted by jmcilhinney
Are you saying that you want to call a database function from a database stored procedure, or that you want to call a database function direct from your VB code?
I want to call a database function from a database stored procedure
-
Jul 17th, 2009, 04:26 AM
#8
Re: Call functions from stored procedured.
 Originally Posted by taybacuniversity
I want to call a database function from a database stored procedure
Then why have you posted in the VB.NET forum? That's straight SQL and has nothing to do with VB.NET. SQL questions belong in the Database Development forum.
You call user-defined functions in exactly the same way as you call inbuilt functions: you put the name and then a comma separated list of arguments within parentheses, e.g.
SQL Code:
SELECT * FROM MyTable WHERE MyColumn = MyFunction(param1, param2)
-
Jul 17th, 2009, 04:41 AM
#9
Thread Starter
Lively Member
Re: Call functions from stored procedured.
 Originally Posted by jmcilhinney
Then why have you posted in the VB.NET forum? That's straight SQL and has nothing to do with VB.NET. SQL questions belong in the Database Development forum.
You call user-defined functions in exactly the same way as you call inbuilt functions: you put the name and then a comma separated list of arguments within parentheses, e.g.
SQL Code:
SELECT * FROM MyTable WHERE MyColumn = MyFunction(param1, param2)
You mean i have to go to this section ?
http://www.vbforums.com/forumdisplay.php?f=3
-
Jul 17th, 2009, 04:49 AM
#10
Re: Call functions from stored procedured.
I've already asked the moderators to move this thread so please don't post this same question again. In future though, yes your DB-specific questions belong in that forum. Just read the description of each forum and ask yourself which one describes your topic. If you want to write a stored procedure that calls a function then that has nothing to do with the application that will execute that stored procedure. You could write a hundred different applications in a hundred different languages to call that stored procedure and that wouldn't change how it calls a function.
-
Jul 17th, 2009, 05:25 AM
#11
Re: Call functions from stored procedured.
Thread moved to Database Development forum
(thanks for letting us know jmcilhinney )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|