Friday, March 23, 2012
Passing Dates to Stored Procedure
I want to know how can i Pass tow Dates to Stored Procedure in sql server
2000 by using vb6.
I need samplr code
Best regards
aymansee
http://www.mindsdoor.net/VB/VB6DataAccessLayer.html
http://www.mindsdoor.net/VB/VBExecSPSimple.html
If you want to use character dates use format yyyymmdd.
"ayman" wrote:
> Hi
> I want to know how can i Pass tow Dates to Stored Procedure in sql server
> 2000 by using vb6.
> I need samplr code
>
> Best regards
> ayman|||Hi
This shows how to call a stored procedure with parameters.
http://msdn.microsoft.com/library/d...
25v.asp
Dates can be declared as adDate
http://msdn.microsoft.com/library/d..._HV01103607.asp
John
"ayman" <ayman@.discussions.microsoft.com> wrote in message
news:B1867BD5-88F7-4BDF-B645-A7A7BFA023C9@.microsoft.com...
> Hi
> I want to know how can i Pass tow Dates to Stored Procedure in sql server
> 2000 by using vb6.
> I need samplr code
>
> Best regards
> ayman
Wednesday, March 21, 2012
passing column name as parameter to a stored procedure
I want to pass a column name, sometimes a table name, to a stored
procedure, but it didn't work. I tried to define the data type as
char, vachar, nchar, text, but the result were same. Any one know how
to get it work?
Thanks a lot!!
Saiyou[posted and mailed, please reply in news]
Saiyou Anh (wangc@.alexian.net) writes:
> I want to pass a column name, sometimes a table name, to a stored
> procedure, but it didn't work. I tried to define the data type as
> char, vachar, nchar, text, but the result were same. Any one know how
> to get it work?
So why do you need to do this?
While this is possible to do this, you might essentially be throwing
out the baby with the bathtub and loose most of the advantages of
stored procedures. Often this is a token of bad design.
Anyway, I have a longer article on my web site that shows you how to do
it - and why you probably shouldn't.
http://www.sommarskog.se/dynamic_sql.html
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
Passing ArrayList into Sql Query or any other way around
Hi
I have an arraylist that contains the names of those userid's that i need to check in an online db to check out if they are online now.
If the UserId column of the SqlTable matches any of the name of that of the arraylist, then i need to import the values of two corresponding fields say age, Nick etc.
I would be very grateful to anyone who could kindly tell me how to do this in an Sql Query i.e How to actually send an arraylist into sql query or any other way around this problem.
Say the arraylist to be verified against the table is:
public ArrayList BuddyList = new ArrayList();
Thank You.
Regards.
Check this, it would treat your issue in different wayhttp://weblogs.asp.net/pleloup/archive/2003/04/14/5569.aspx
HTH
Monday, February 20, 2012
pasing a set of records to SP
I need to send a set of records to a SP in order to make some comparisos and
calculations and return back from the SP the same records but modified
What is the best (faster,optimal) way to send the records from my client App
via internet to the SQLDB in order to the SP reading those records?
I just discover that a SP does not accept arrays as input parameters.
thks
kenhttp://www.sommarskog.se/arrays-in-sql.html
"Kenny M." <KennyM@.discussions.microsoft.com> wrote in message
news:F69119F4-7020-4B87-9BCA-414F3A446AFC@.microsoft.com...
> hi
> I need to send a set of records to a SP in order to make some comparisos
and
> calculations and return back from the SP the same records but modified
> What is the best (faster,optimal) way to send the records from my client
App
> via internet to the SQLDB in order to the SP reading those records?
>
> I just discover that a SP does not accept arrays as input parameters.
> thks
> ken
>