473,695 Members | 2,902 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Large No. SQL Parameters

Can someone tell me a better way or give me a link that shows a better way to
create large numbers of SQL parameters...

Example... A better way to write this code!

<code>

Sub UploadData(ByVa l sender As Object, ByVal e As EventArgs)

Dim MyConn As New
SqlConnection(C onfigurationSet tings.AppSettin gs("strConn"))
Dim cmd As New SqlCommand("Add Menu", MyConn)
cmd.CommandType = CommandType.Sto redProcedure
Dim Dateparam As New SqlParameter("@ Date", SqlDbType.NVarC har, 255)
' Dim i As Integer
' For i = 0 To 11
Dim Item1param As New SqlParameter("@ mItem1", SqlDbType.NVarC har, 255)
Dim Item2param As New SqlParameter("@ mItem2", SqlDbType.NVarC har, 255)
Dim Item3param As New SqlParameter("@ mItem3", SqlDbType.NVarC har, 255)
Dim Item4param As New SqlParameter("@ mItem4", SqlDbType.NVarC har, 255)
Dim Item5param As New SqlParameter("@ mItem5", SqlDbType.NVarC har, 255)
Dim Item6param As New SqlParameter("@ mItem6", SqlDbType.NVarC har, 255)
Dim Item7param As New SqlParameter("@ mItem7", SqlDbType.NVarC har, 255)
Dim Item8param As New SqlParameter("@ mItem8", SqlDbType.NVarC har, 255)
Dim Item9param As New SqlParameter("@ mItem9", SqlDbType.NVarC har, 255)
Dim Item10param As New SqlParameter("@ mItem10", SqlDbType.NVarC har,
255)

Dim Price1param As New SqlParameter("@ mPrice1", SqlDbType.NVarC har,
255)
Dim Price2param As New SqlParameter("@ mPrice2", SqlDbType.NVarC har,
255)
Dim Price3param As New SqlParameter("@ mPrice3", SqlDbType.NVarC har,
255)
Dim Price4param As New SqlParameter("@ mPrice4", SqlDbType.NVarC har,
255)
Dim Price5param As New SqlParameter("@ mPrice5", SqlDbType.NVarC har,
255)
Dim Price6param As New SqlParameter("@ mPrice6", SqlDbType.NVarC har,
255)
Dim Price7param As New SqlParameter("@ mPrice7", SqlDbType.NVarC har,
255)
Dim Price8param As New SqlParameter("@ mPrice8", SqlDbType.NVarC har,
255)
Dim Price9param As New SqlParameter("@ mPrice9", SqlDbType.NVarC har,
255)
Dim Price10param As New SqlParameter("@ mPrice10",
SqlDbType.NVarC har, 255)

Dateparam.Value = tbDate.Text
Item1param.Valu e = tbMenuItem1.Tex t
Item2param.Valu e = tbMenuItem2.Tex t
Item3param.Valu e = tbMenuItem3.Tex t
Item4param.Valu e = tbMenuItem4.Tex t
Item5param.Valu e = tbMenuItem5.Tex t
Item6param.Valu e = tbMenuItem6.Tex t
Item7param.Valu e = tbMenuItem7.Tex t
Item8param.Valu e = tbMenuItem8.Tex t
Item9param.Valu e = tbMenuItem9.Tex t
Item10param.Val ue = tbMenuItem10.Te xt

Price1param.Val ue = tbMenuPrice1.Te xt
Price2param.Val ue = tbMenuPrice2.Te xt
Price3param.Val ue = tbMenuPrice3.Te xt
Price4param.Val ue = tbMenuPrice4.Te xt
Price5param.Val ue = tbMenuPrice5.Te xt
Price6param.Val ue = tbMenuPrice6.Te xt
Price7param.Val ue = tbMenuPrice7.Te xt
Price8param.Val ue = tbMenuPrice8.Te xt
Price9param.Val ue = tbMenuPrice9.Te xt
Price10param.Va lue = tbMenuPrice10.T ext
cmd.Parameters. Add(Dateparam)
cmd.Parameters. Add(Item1param)
cmd.Parameters. Add(Item2param)
cmd.Parameters. Add(Item3param)
cmd.Parameters. Add(Item4param)
cmd.Parameters. Add(Item5param)
cmd.Parameters. Add(Item6param)
cmd.Parameters. Add(Item7param)
cmd.Parameters. Add(Item8param)
cmd.Parameters. Add(Item9param)
cmd.Parameters. Add(Item10param )

cmd.Parameters. Add(Price1param )
cmd.Parameters. Add(Price2param )
cmd.Parameters. Add(Price3param )
cmd.Parameters. Add(Price4param )
cmd.Parameters. Add(Price5param )
cmd.Parameters. Add(Price6param )
cmd.Parameters. Add(Price7param )
cmd.Parameters. Add(Price8param )
cmd.Parameters. Add(Price9param )
cmd.Parameters. Add(Price10para m)
' Next

MyConn.Open()
cmd.ExecuteNonQ uery()
MyConn.Close()
End Sub
Nov 19 '05 #1
4 1642
i found a shorter way in c#. Hope this can help
cmd.Parameters. Add(new SqlParameter("@ ParamName", SqlDbType.VarCh ar,
50)).Value = "Some Value";
Not sure how to translate this into VB

P.S. in .NET 2.0 you can now go cmd.Paramaters. AddWithValue("@ ParamName",
"Value"); much easier eh?
"Tim::.." <myatix_at_hotm ail.com> wrote in message
news:62******** *************** ***********@mic rosoft.com...
Can someone tell me a better way or give me a link that shows a better way
to
create large numbers of SQL parameters...

Example... A better way to write this code!

<code>

Sub UploadData(ByVa l sender As Object, ByVal e As EventArgs)

Dim MyConn As New
SqlConnection(C onfigurationSet tings.AppSettin gs("strConn"))
Dim cmd As New SqlCommand("Add Menu", MyConn)
cmd.CommandType = CommandType.Sto redProcedure
Dim Dateparam As New SqlParameter("@ Date", SqlDbType.NVarC har, 255)
' Dim i As Integer
' For i = 0 To 11
Dim Item1param As New SqlParameter("@ mItem1", SqlDbType.NVarC har,
255)
Dim Item2param As New SqlParameter("@ mItem2", SqlDbType.NVarC har,
255)
Dim Item3param As New SqlParameter("@ mItem3", SqlDbType.NVarC har,
255)
Dim Item4param As New SqlParameter("@ mItem4", SqlDbType.NVarC har,
255)
Dim Item5param As New SqlParameter("@ mItem5", SqlDbType.NVarC har,
255)
Dim Item6param As New SqlParameter("@ mItem6", SqlDbType.NVarC har,
255)
Dim Item7param As New SqlParameter("@ mItem7", SqlDbType.NVarC har,
255)
Dim Item8param As New SqlParameter("@ mItem8", SqlDbType.NVarC har,
255)
Dim Item9param As New SqlParameter("@ mItem9", SqlDbType.NVarC har,
255)
Dim Item10param As New SqlParameter("@ mItem10", SqlDbType.NVarC har,
255)

Dim Price1param As New SqlParameter("@ mPrice1", SqlDbType.NVarC har,
255)
Dim Price2param As New SqlParameter("@ mPrice2", SqlDbType.NVarC har,
255)
Dim Price3param As New SqlParameter("@ mPrice3", SqlDbType.NVarC har,
255)
Dim Price4param As New SqlParameter("@ mPrice4", SqlDbType.NVarC har,
255)
Dim Price5param As New SqlParameter("@ mPrice5", SqlDbType.NVarC har,
255)
Dim Price6param As New SqlParameter("@ mPrice6", SqlDbType.NVarC har,
255)
Dim Price7param As New SqlParameter("@ mPrice7", SqlDbType.NVarC har,
255)
Dim Price8param As New SqlParameter("@ mPrice8", SqlDbType.NVarC har,
255)
Dim Price9param As New SqlParameter("@ mPrice9", SqlDbType.NVarC har,
255)
Dim Price10param As New SqlParameter("@ mPrice10",
SqlDbType.NVarC har, 255)

Dateparam.Value = tbDate.Text
Item1param.Valu e = tbMenuItem1.Tex t
Item2param.Valu e = tbMenuItem2.Tex t
Item3param.Valu e = tbMenuItem3.Tex t
Item4param.Valu e = tbMenuItem4.Tex t
Item5param.Valu e = tbMenuItem5.Tex t
Item6param.Valu e = tbMenuItem6.Tex t
Item7param.Valu e = tbMenuItem7.Tex t
Item8param.Valu e = tbMenuItem8.Tex t
Item9param.Valu e = tbMenuItem9.Tex t
Item10param.Val ue = tbMenuItem10.Te xt

Price1param.Val ue = tbMenuPrice1.Te xt
Price2param.Val ue = tbMenuPrice2.Te xt
Price3param.Val ue = tbMenuPrice3.Te xt
Price4param.Val ue = tbMenuPrice4.Te xt
Price5param.Val ue = tbMenuPrice5.Te xt
Price6param.Val ue = tbMenuPrice6.Te xt
Price7param.Val ue = tbMenuPrice7.Te xt
Price8param.Val ue = tbMenuPrice8.Te xt
Price9param.Val ue = tbMenuPrice9.Te xt
Price10param.Va lue = tbMenuPrice10.T ext
cmd.Parameters. Add(Dateparam)
cmd.Parameters. Add(Item1param)
cmd.Parameters. Add(Item2param)
cmd.Parameters. Add(Item3param)
cmd.Parameters. Add(Item4param)
cmd.Parameters. Add(Item5param)
cmd.Parameters. Add(Item6param)
cmd.Parameters. Add(Item7param)
cmd.Parameters. Add(Item8param)
cmd.Parameters. Add(Item9param)
cmd.Parameters. Add(Item10param )

cmd.Parameters. Add(Price1param )
cmd.Parameters. Add(Price2param )
cmd.Parameters. Add(Price3param )
cmd.Parameters. Add(Price4param )
cmd.Parameters. Add(Price5param )
cmd.Parameters. Add(Price6param )
cmd.Parameters. Add(Price7param )
cmd.Parameters. Add(Price8param )
cmd.Parameters. Add(Price9param )
cmd.Parameters. Add(Price10para m)
' Next

MyConn.Open()
cmd.ExecuteNonQ uery()
MyConn.Close()
End Sub

Nov 19 '05 #2
i found a shorter way in c#. Hope this can help
cmd.Parameters. Add(new SqlParameter("@ ParamName", SqlDbType.VarCh ar,
50)).Value = "Some Value";
Not sure how to translate this into VB

P.S. in .NET 2.0 you can now go cmd.Paramaters. AddWithValue("@ ParamName",
"Value"); much easier eh?
"Tim::.." <myatix_at_hotm ail.com> wrote in message
news:62******** *************** ***********@mic rosoft.com...
Can someone tell me a better way or give me a link that shows a better way
to
create large numbers of SQL parameters...

Example... A better way to write this code!

<code>

Sub UploadData(ByVa l sender As Object, ByVal e As EventArgs)

Dim MyConn As New
SqlConnection(C onfigurationSet tings.AppSettin gs("strConn"))
Dim cmd As New SqlCommand("Add Menu", MyConn)
cmd.CommandType = CommandType.Sto redProcedure
Dim Dateparam As New SqlParameter("@ Date", SqlDbType.NVarC har, 255)
' Dim i As Integer
' For i = 0 To 11
Dim Item1param As New SqlParameter("@ mItem1", SqlDbType.NVarC har,
255)
Dim Item2param As New SqlParameter("@ mItem2", SqlDbType.NVarC har,
255)
Dim Item3param As New SqlParameter("@ mItem3", SqlDbType.NVarC har,
255)
Dim Item4param As New SqlParameter("@ mItem4", SqlDbType.NVarC har,
255)
Dim Item5param As New SqlParameter("@ mItem5", SqlDbType.NVarC har,
255)
Dim Item6param As New SqlParameter("@ mItem6", SqlDbType.NVarC har,
255)
Dim Item7param As New SqlParameter("@ mItem7", SqlDbType.NVarC har,
255)
Dim Item8param As New SqlParameter("@ mItem8", SqlDbType.NVarC har,
255)
Dim Item9param As New SqlParameter("@ mItem9", SqlDbType.NVarC har,
255)
Dim Item10param As New SqlParameter("@ mItem10", SqlDbType.NVarC har,
255)

Dim Price1param As New SqlParameter("@ mPrice1", SqlDbType.NVarC har,
255)
Dim Price2param As New SqlParameter("@ mPrice2", SqlDbType.NVarC har,
255)
Dim Price3param As New SqlParameter("@ mPrice3", SqlDbType.NVarC har,
255)
Dim Price4param As New SqlParameter("@ mPrice4", SqlDbType.NVarC har,
255)
Dim Price5param As New SqlParameter("@ mPrice5", SqlDbType.NVarC har,
255)
Dim Price6param As New SqlParameter("@ mPrice6", SqlDbType.NVarC har,
255)
Dim Price7param As New SqlParameter("@ mPrice7", SqlDbType.NVarC har,
255)
Dim Price8param As New SqlParameter("@ mPrice8", SqlDbType.NVarC har,
255)
Dim Price9param As New SqlParameter("@ mPrice9", SqlDbType.NVarC har,
255)
Dim Price10param As New SqlParameter("@ mPrice10",
SqlDbType.NVarC har, 255)

Dateparam.Value = tbDate.Text
Item1param.Valu e = tbMenuItem1.Tex t
Item2param.Valu e = tbMenuItem2.Tex t
Item3param.Valu e = tbMenuItem3.Tex t
Item4param.Valu e = tbMenuItem4.Tex t
Item5param.Valu e = tbMenuItem5.Tex t
Item6param.Valu e = tbMenuItem6.Tex t
Item7param.Valu e = tbMenuItem7.Tex t
Item8param.Valu e = tbMenuItem8.Tex t
Item9param.Valu e = tbMenuItem9.Tex t
Item10param.Val ue = tbMenuItem10.Te xt

Price1param.Val ue = tbMenuPrice1.Te xt
Price2param.Val ue = tbMenuPrice2.Te xt
Price3param.Val ue = tbMenuPrice3.Te xt
Price4param.Val ue = tbMenuPrice4.Te xt
Price5param.Val ue = tbMenuPrice5.Te xt
Price6param.Val ue = tbMenuPrice6.Te xt
Price7param.Val ue = tbMenuPrice7.Te xt
Price8param.Val ue = tbMenuPrice8.Te xt
Price9param.Val ue = tbMenuPrice9.Te xt
Price10param.Va lue = tbMenuPrice10.T ext
cmd.Parameters. Add(Dateparam)
cmd.Parameters. Add(Item1param)
cmd.Parameters. Add(Item2param)
cmd.Parameters. Add(Item3param)
cmd.Parameters. Add(Item4param)
cmd.Parameters. Add(Item5param)
cmd.Parameters. Add(Item6param)
cmd.Parameters. Add(Item7param)
cmd.Parameters. Add(Item8param)
cmd.Parameters. Add(Item9param)
cmd.Parameters. Add(Item10param )

cmd.Parameters. Add(Price1param )
cmd.Parameters. Add(Price2param )
cmd.Parameters. Add(Price3param )
cmd.Parameters. Add(Price4param )
cmd.Parameters. Add(Price5param )
cmd.Parameters. Add(Price6param )
cmd.Parameters. Add(Price7param )
cmd.Parameters. Add(Price8param )
cmd.Parameters. Add(Price9param )
cmd.Parameters. Add(Price10para m)
' Next

MyConn.Open()
cmd.ExecuteNonQ uery()
MyConn.Close()
End Sub

Nov 19 '05 #3
Thanks for the tip!

"Grant Merwitz" wrote:
i found a shorter way in c#. Hope this can help
cmd.Parameters. Add(new SqlParameter("@ ParamName", SqlDbType.VarCh ar,
50)).Value = "Some Value";
Not sure how to translate this into VB

P.S. in .NET 2.0 you can now go cmd.Paramaters. AddWithValue("@ ParamName",
"Value"); much easier eh?
"Tim::.." <myatix_at_hotm ail.com> wrote in message
news:62******** *************** ***********@mic rosoft.com...
Can someone tell me a better way or give me a link that shows a better way
to
create large numbers of SQL parameters...

Example... A better way to write this code!

<code>

Sub UploadData(ByVa l sender As Object, ByVal e As EventArgs)

Dim MyConn As New
SqlConnection(C onfigurationSet tings.AppSettin gs("strConn"))
Dim cmd As New SqlCommand("Add Menu", MyConn)
cmd.CommandType = CommandType.Sto redProcedure
Dim Dateparam As New SqlParameter("@ Date", SqlDbType.NVarC har, 255)
' Dim i As Integer
' For i = 0 To 11
Dim Item1param As New SqlParameter("@ mItem1", SqlDbType.NVarC har,
255)
Dim Item2param As New SqlParameter("@ mItem2", SqlDbType.NVarC har,
255)
Dim Item3param As New SqlParameter("@ mItem3", SqlDbType.NVarC har,
255)
Dim Item4param As New SqlParameter("@ mItem4", SqlDbType.NVarC har,
255)
Dim Item5param As New SqlParameter("@ mItem5", SqlDbType.NVarC har,
255)
Dim Item6param As New SqlParameter("@ mItem6", SqlDbType.NVarC har,
255)
Dim Item7param As New SqlParameter("@ mItem7", SqlDbType.NVarC har,
255)
Dim Item8param As New SqlParameter("@ mItem8", SqlDbType.NVarC har,
255)
Dim Item9param As New SqlParameter("@ mItem9", SqlDbType.NVarC har,
255)
Dim Item10param As New SqlParameter("@ mItem10", SqlDbType.NVarC har,
255)

Dim Price1param As New SqlParameter("@ mPrice1", SqlDbType.NVarC har,
255)
Dim Price2param As New SqlParameter("@ mPrice2", SqlDbType.NVarC har,
255)
Dim Price3param As New SqlParameter("@ mPrice3", SqlDbType.NVarC har,
255)
Dim Price4param As New SqlParameter("@ mPrice4", SqlDbType.NVarC har,
255)
Dim Price5param As New SqlParameter("@ mPrice5", SqlDbType.NVarC har,
255)
Dim Price6param As New SqlParameter("@ mPrice6", SqlDbType.NVarC har,
255)
Dim Price7param As New SqlParameter("@ mPrice7", SqlDbType.NVarC har,
255)
Dim Price8param As New SqlParameter("@ mPrice8", SqlDbType.NVarC har,
255)
Dim Price9param As New SqlParameter("@ mPrice9", SqlDbType.NVarC har,
255)
Dim Price10param As New SqlParameter("@ mPrice10",
SqlDbType.NVarC har, 255)

Dateparam.Value = tbDate.Text
Item1param.Valu e = tbMenuItem1.Tex t
Item2param.Valu e = tbMenuItem2.Tex t
Item3param.Valu e = tbMenuItem3.Tex t
Item4param.Valu e = tbMenuItem4.Tex t
Item5param.Valu e = tbMenuItem5.Tex t
Item6param.Valu e = tbMenuItem6.Tex t
Item7param.Valu e = tbMenuItem7.Tex t
Item8param.Valu e = tbMenuItem8.Tex t
Item9param.Valu e = tbMenuItem9.Tex t
Item10param.Val ue = tbMenuItem10.Te xt

Price1param.Val ue = tbMenuPrice1.Te xt
Price2param.Val ue = tbMenuPrice2.Te xt
Price3param.Val ue = tbMenuPrice3.Te xt
Price4param.Val ue = tbMenuPrice4.Te xt
Price5param.Val ue = tbMenuPrice5.Te xt
Price6param.Val ue = tbMenuPrice6.Te xt
Price7param.Val ue = tbMenuPrice7.Te xt
Price8param.Val ue = tbMenuPrice8.Te xt
Price9param.Val ue = tbMenuPrice9.Te xt
Price10param.Va lue = tbMenuPrice10.T ext
cmd.Parameters. Add(Dateparam)
cmd.Parameters. Add(Item1param)
cmd.Parameters. Add(Item2param)
cmd.Parameters. Add(Item3param)
cmd.Parameters. Add(Item4param)
cmd.Parameters. Add(Item5param)
cmd.Parameters. Add(Item6param)
cmd.Parameters. Add(Item7param)
cmd.Parameters. Add(Item8param)
cmd.Parameters. Add(Item9param)
cmd.Parameters. Add(Item10param )

cmd.Parameters. Add(Price1param )
cmd.Parameters. Add(Price2param )
cmd.Parameters. Add(Price3param )
cmd.Parameters. Add(Price4param )
cmd.Parameters. Add(Price5param )
cmd.Parameters. Add(Price6param )
cmd.Parameters. Add(Price7param )
cmd.Parameters. Add(Price8param )
cmd.Parameters. Add(Price9param )
cmd.Parameters. Add(Price10para m)
' Next

MyConn.Open()
cmd.ExecuteNonQ uery()
MyConn.Close()
End Sub


Nov 19 '05 #4
Thanks for the tip!

"Grant Merwitz" wrote:
i found a shorter way in c#. Hope this can help
cmd.Parameters. Add(new SqlParameter("@ ParamName", SqlDbType.VarCh ar,
50)).Value = "Some Value";
Not sure how to translate this into VB

P.S. in .NET 2.0 you can now go cmd.Paramaters. AddWithValue("@ ParamName",
"Value"); much easier eh?
"Tim::.." <myatix_at_hotm ail.com> wrote in message
news:62******** *************** ***********@mic rosoft.com...
Can someone tell me a better way or give me a link that shows a better way
to
create large numbers of SQL parameters...

Example... A better way to write this code!

<code>

Sub UploadData(ByVa l sender As Object, ByVal e As EventArgs)

Dim MyConn As New
SqlConnection(C onfigurationSet tings.AppSettin gs("strConn"))
Dim cmd As New SqlCommand("Add Menu", MyConn)
cmd.CommandType = CommandType.Sto redProcedure
Dim Dateparam As New SqlParameter("@ Date", SqlDbType.NVarC har, 255)
' Dim i As Integer
' For i = 0 To 11
Dim Item1param As New SqlParameter("@ mItem1", SqlDbType.NVarC har,
255)
Dim Item2param As New SqlParameter("@ mItem2", SqlDbType.NVarC har,
255)
Dim Item3param As New SqlParameter("@ mItem3", SqlDbType.NVarC har,
255)
Dim Item4param As New SqlParameter("@ mItem4", SqlDbType.NVarC har,
255)
Dim Item5param As New SqlParameter("@ mItem5", SqlDbType.NVarC har,
255)
Dim Item6param As New SqlParameter("@ mItem6", SqlDbType.NVarC har,
255)
Dim Item7param As New SqlParameter("@ mItem7", SqlDbType.NVarC har,
255)
Dim Item8param As New SqlParameter("@ mItem8", SqlDbType.NVarC har,
255)
Dim Item9param As New SqlParameter("@ mItem9", SqlDbType.NVarC har,
255)
Dim Item10param As New SqlParameter("@ mItem10", SqlDbType.NVarC har,
255)

Dim Price1param As New SqlParameter("@ mPrice1", SqlDbType.NVarC har,
255)
Dim Price2param As New SqlParameter("@ mPrice2", SqlDbType.NVarC har,
255)
Dim Price3param As New SqlParameter("@ mPrice3", SqlDbType.NVarC har,
255)
Dim Price4param As New SqlParameter("@ mPrice4", SqlDbType.NVarC har,
255)
Dim Price5param As New SqlParameter("@ mPrice5", SqlDbType.NVarC har,
255)
Dim Price6param As New SqlParameter("@ mPrice6", SqlDbType.NVarC har,
255)
Dim Price7param As New SqlParameter("@ mPrice7", SqlDbType.NVarC har,
255)
Dim Price8param As New SqlParameter("@ mPrice8", SqlDbType.NVarC har,
255)
Dim Price9param As New SqlParameter("@ mPrice9", SqlDbType.NVarC har,
255)
Dim Price10param As New SqlParameter("@ mPrice10",
SqlDbType.NVarC har, 255)

Dateparam.Value = tbDate.Text
Item1param.Valu e = tbMenuItem1.Tex t
Item2param.Valu e = tbMenuItem2.Tex t
Item3param.Valu e = tbMenuItem3.Tex t
Item4param.Valu e = tbMenuItem4.Tex t
Item5param.Valu e = tbMenuItem5.Tex t
Item6param.Valu e = tbMenuItem6.Tex t
Item7param.Valu e = tbMenuItem7.Tex t
Item8param.Valu e = tbMenuItem8.Tex t
Item9param.Valu e = tbMenuItem9.Tex t
Item10param.Val ue = tbMenuItem10.Te xt

Price1param.Val ue = tbMenuPrice1.Te xt
Price2param.Val ue = tbMenuPrice2.Te xt
Price3param.Val ue = tbMenuPrice3.Te xt
Price4param.Val ue = tbMenuPrice4.Te xt
Price5param.Val ue = tbMenuPrice5.Te xt
Price6param.Val ue = tbMenuPrice6.Te xt
Price7param.Val ue = tbMenuPrice7.Te xt
Price8param.Val ue = tbMenuPrice8.Te xt
Price9param.Val ue = tbMenuPrice9.Te xt
Price10param.Va lue = tbMenuPrice10.T ext
cmd.Parameters. Add(Dateparam)
cmd.Parameters. Add(Item1param)
cmd.Parameters. Add(Item2param)
cmd.Parameters. Add(Item3param)
cmd.Parameters. Add(Item4param)
cmd.Parameters. Add(Item5param)
cmd.Parameters. Add(Item6param)
cmd.Parameters. Add(Item7param)
cmd.Parameters. Add(Item8param)
cmd.Parameters. Add(Item9param)
cmd.Parameters. Add(Item10param )

cmd.Parameters. Add(Price1param )
cmd.Parameters. Add(Price2param )
cmd.Parameters. Add(Price3param )
cmd.Parameters. Add(Price4param )
cmd.Parameters. Add(Price5param )
cmd.Parameters. Add(Price6param )
cmd.Parameters. Add(Price7param )
cmd.Parameters. Add(Price8param )
cmd.Parameters. Add(Price9param )
cmd.Parameters. Add(Price10para m)
' Next

MyConn.Open()
cmd.ExecuteNonQ uery()
MyConn.Close()
End Sub


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
6378
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but something I'll need in this case is some experience-based set of rules about how to use python in this context. For example... is defining readonly attributes in classes worth the hassle ? Does duck-typing scale well in complex
3
4448
by: WinstonSmith | last post by:
Hello everyone, I got a problem about GC when creating large fields (some MB), set reference to null and call GC.Collect. Not all virtual mem is released. Situation improved in .net 1.1 but not in a full satisfying way. Has anyone a solution to handle large object in safe code? (Unsafe mem management works, but has serious disadvantages on serialization.)
0
1840
by: cschang | last post by:
Error: "ORA-06513: PL/SQL: index for PL/SQL table out of range for host language array ORA-06512: at line 1 /vd2/asp/BinInactivityResults.asp, line 249" the error only appeared when I had a large number records return (> 12000), anything less 7000 is fine (I had not tried any number between). Wonder why? I am using oracle 8.1.7, retrun table type reocrds with my IIS 4 on NT 4 'ASP sysntax as ... set commBinAct = server.CreateObject...
0
302
by: Tim::.. | last post by:
Can someone tell me a better way or give me a link that shows a better way to create large numbers of SQL parameters... Example... A better way to write this code! <code> Sub UploadData(ByVal sender As Object, ByVal e As EventArgs) Dim MyConn As New
5
5592
by: Louis LeBlanc | last post by:
Hey folks. I'm new to the list, and not quite what you'd call a DB Guru, so please be patient with me. I'm afraid the lead up here is a bit verbose . . . I am working on an application that uses very high volume DB transactions - in the order of tens of millions per day . . . Anyway, the current database which will remain nameless, but begins with O and rymes with debacle (sorta), has a problem with high volume work when it comes to...
6
2559
by: Alex | last post by:
Hi... I have a stored procedure that takes in a large number of parameters (around 30) and returns (as output parameters) another 10 or so. At the moment, each parameter is declared, defined and added in my C# code as follows: SqlParameter prmCustAcctID = cmd.CreateParameter(); prmCustAcctID.ParameterName = "@CustAcctID";
10
5887
by: Peter Duniho | last post by:
This is kind of a question about C# and kind of one about the framework. Hopefully, there's an answer in there somewhere. :) I'm curious about the status of 32-bit vs 64-bit in C# and the framework classes. The specific example I'm running into is with respect to byte arrays and the BitConverter class. In C# you can create arrays larger than 2^32, using the overloaded methods that take 64-bit parameters. But as near as I can tell,...
19
7823
by: Chaz Ginger | last post by:
I have a system that has a few lists that are very large (thousands or tens of thousands of entries) and some that are rather small. Many times I have to produce the difference between a large list and a small one, without destroying the integrity of either list. I was wondering if anyone has any recommendations on how to do this and keep performance high? Is there a better way than Thanks.
5
1838
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello Everyone, What will be the best way of passing large number of paramers from one method to another so that I can insert them in the Database. Thanks.
0
8583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9126
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9002
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8861
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7673
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4349
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3021
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2283
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1984
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.