|
-
Jun 13th, 2003, 09:51 AM
#1
Thread Starter
Sleep mode
What does this symbol mean ?
I do understand this code but I'm asking about this special symbol , what does it mean for SQL ?@ lol
VB Code:
cmd.CommandText = "INSERT INTO myTable (Name, RegisteredDate, CancelDate) " & _
"VALUES (@Name, @RegisteredDate, @CancelDate)"
cmd.Parameters.Add("@Name", "Doug Seven")
cmd.Parameters.Add("@RegisteredDate", DateTime.Today)
'Use System.DBNull.Value to leave the field uninitialized
cmd.Parameters.Add("@CancelDate", System.DBNull.Value)
-
Jun 13th, 2003, 09:53 AM
#2
It is a variable
e.g.
DECLARE @my_thing CHAR(3)
SELECT @my_thing = 'HI'
SELECT @my_thing
prints "HI"...
-
Jun 13th, 2003, 09:57 AM
#3
Thread Starter
Sleep mode
Hmm , isn't here a string ?
VB Code:
cmd.Parameters.Add("@Name", "Doug Seven")
isn't it the same as this ??
VB Code:
cmd.Parameters.Add("Name", "Doug Seven")
-
Jun 13th, 2003, 11:06 AM
#4
Addicted Member
in this case they refer to named arguments in a SQLServer Procedure
-
Jun 13th, 2003, 03:04 PM
#5
Thread Starter
Sleep mode
Originally posted by powdir
in this case they refer to named arguments in a SQLServer Procedure
I think so . I tried the code below and gives me error . It means , I can't use it with variables as Merrion said .
-
Jun 13th, 2003, 04:26 PM
#6
Addicted Member
Marion posted how they(variables) are declared inside the sproc.
"And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
Frank Zappa
-
Jun 13th, 2003, 04:50 PM
#7
Thread Starter
Sleep mode
You mean this stored procedure language (though I have no idea about it) . It could be . .
-
Jun 13th, 2003, 05:22 PM
#8
PowerPoster
Yah that is TransactSQL right? I've never fooled with stored procedures much.
In any case you can't use that in VB code only in Sql Server stored procedures, triggers etc..
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
Jun 13th, 2003, 05:27 PM
#9
Thread Starter
Sleep mode
oh TransactSQL ! Still confusing between them ...lol . I noticed that symbol only in SQL Server database .
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
|