473,585 Members | 2,717 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Insert data with a stored procedure

What a pain trying to insert data into a table from a stored proc. My
webform asks for 16 pieces of data - which then gets written to the
database.

I found this easier than the crap below (after the ***********).

This was eaiser:

get a list of all the parameters you want to pass - put them in a
string:

i.e.

mysql = "'" & txtorgOrgName.T ext & "'," & ddorgCategory.S electedValue
& ",'" & txtorgAddress.T ext & "','" & _
txtorgCity.Text & "'," & ddorgProvince.S electedValue
& ",'" & txtorgPostal.Te xt & "','" & txtorgPhone1.Te xt & "','" &
txtorgPhoneX1.T ext & "','" & _
txtorgPhone2.Te xt & "','" & txtorgPhoneX2.T ext &
"','" & txtorgFax.Text & "','" & _
txtorgEmail.Tex t & "','" & Now.Date & "','" &
txtorgContact.T ext & "','" & _
txtorgTitle.Tex t & "','" & txtorgDept.Text & "'"

Then put the directions into your command string

Dim cmd As New SqlCommand("EXE CUTE sp_InsertOrgani zation " & mysql,
sqlAbComm)
sqlAbComm.Open( )

Try
'cmd.CommandTex t = "EXECUTE sp_InsertOrgani zation " &
mysql
cmd.CommandType = CommandType.Tex t
rows = cmd.ExecuteNonQ uery()

lblInsert.Visib le = True
lblInsert.Text = "Record ADDED: " & rows

Catch xcp As SqlException

lblInsert.Visib le = True
lblInsert.Text = "Unexpected Exception:" & xcp.ToString

End Try

The stored proc looks like this:

"EXECUTE sp_InsertOrgani zation 'WebCost',1,'50
Havelot','Brigh ton',9,'q2r6t6' ,'555-8787','12','555-9901','22','555-5555','W**@cost .com','9/3/2003','John
Mckan','VP','Ta x'"

The data after the stored proc gets inserted! Beats the crap below!

Easier.
**************
'insert organization data into table
Dim mysql As String
Dim rows As Integer

'CANNOT INSERT INTO AN ANTONUM / IDENTITY FIELD.
'Dim pr1 As New SqlParameter
'pr1.ParameterN ame = ("@orgId")
'pr1.Direction = ParameterDirect ion.Input
'pr1.DbType = DbType.Int16
'pr1.Value = 0

'Dim pr2 As New SqlParameter
'pr2.ParameterN ame = ("@orgName")
'pr2.Direction = ParameterDirect ion.Input
'pr2.DbType = DbType.String
'pr2.Value = txtorgOrgName.T ext

'Dim pr3 As New SqlParameter
'pr3.ParameterN ame = ("@catId")
'pr3.Direction = ParameterDirect ion.Input
'pr3.DbType = DbType.String
'pr3.Value = ddorgCategory.D ataValueField

'Dim pr4 As New SqlParameter
'pr4.ParameterN ame = ("@orgAddres s")
'pr4.Direction = ParameterDirect ion.Input
'pr4.DbType = DbType.String
'pr4.Value = txtorgAddress.T ext

'Dim pr5 As New SqlParameter
'pr5.ParameterN ame = ("@orgCity")
'pr5.Direction = ParameterDirect ion.Input
'pr5.DbType = DbType.String
'pr5.Value = txtorgCity.Text

'Dim pr6 As New SqlParameter
'pr6.ParameterN ame = ("@orgProvince" )
'pr6.Direction = ParameterDirect ion.Input
'pr6.DbType = DbType.Int16
'pr6.Value = ddorgProvince.D ataValueField

'Dim pr7 As New SqlParameter
'pr7.ParameterN ame = ("@orgPostalCod e")
'pr7.Direction = ParameterDirect ion.Input
'pr7.DbType = DbType.String
'pr7.Value = txtorgPostal.Te xt

'Dim pr8 As New SqlParameter
'pr8.ParameterN ame = ("@orgPhone1 ")
'pr8.Direction = ParameterDirect ion.Input
'pr8.DbType = DbType.String
'pr8.Value = txtorgPhone1.Te xt

'Dim pr9 As New SqlParameter
'pr9.ParameterN ame = ("@orgPhone1Ext ")
'pr9.Direction = ParameterDirect ion.Input
'pr9.DbType = DbType.String
'pr9.Value = txtorgPhoneX1.T ext

'Dim pr10 As New SqlParameter
'pr10.Parameter Name = ("@orgPhone2 ")
'pr10.Direction = ParameterDirect ion.Input
'pr10.DbType = DbType.String
'pr10.Value = txtorgPhone2.Te xt

'Dim pr11 As New SqlParameter
'pr11.Parameter Name = ("@orgPhone2Ext ")
'pr11.Direction = ParameterDirect ion.Input
'pr11.DbType = DbType.String
'pr11.Value = txtorgPhoneX2.T ext

'Dim pr12 As New SqlParameter
'pr12.Parameter Name = ("@orgFaxNumber ")
'pr12.Direction = ParameterDirect ion.Input
'pr12.DbType = DbType.String
'pr12.Value = txtorgFax.Text

'Dim pr13 As New SqlParameter
'pr13.Parameter Name = ("@orgEmail" )
'pr13.Direction = ParameterDirect ion.Input
'pr13.DbType = DbType.String
'pr13.Value = txtorgEmail.Tex t

'Dim pr14 As New SqlParameter
'pr14.Parameter Name = ("@orgDateRegis tered")
'pr14.Direction = ParameterDirect ion.Input
'pr14.DbType = DbType.Date
'pr14.Value = Now.Date

'Dim pr15 As New SqlParameter
'pr15.Parameter Name = ("@orgContactPe rson")
'pr15.Direction = ParameterDirect ion.Input
'pr15.DbType = DbType.String
'pr15.Value = txtorgContact.T ext

'Dim pr16 As New SqlParameter
'pr16.Parameter Name = ("@orgTitle" )
'pr16.Direction = ParameterDirect ion.Input
'pr16.DbType = DbType.String
'pr16.Value = txtorgTitle.Tex t

'Dim pr17 As New SqlParameter
'pr17.Parameter Name = ("@orgDept")
'pr17.Direction = ParameterDirect ion.Input
'pr17.DbType = DbType.String
'pr17.Value = txtorgDept.Text

''Dim insertedrows As SqlParameter
''insertedrows. ParameterName = ("@@IDENTITY ")
''insertedrows. Direction = ParameterDirect ion.ReturnValue
''insertedrows. DbType = DbType.Int16
''rows = insertedrows.Va lue
''cmd.Parameter s.Add(pr1)
'cmd.Parameters .Add(pr2)
'cmd.Parameters .Add(pr3)
'cmd.Parameters .Add(pr4)
'cmd.Parameters .Add(pr5)
'cmd.Parameters .Add(pr6)
'cmd.Parameters .Add(pr7)
'cmd.Parameters .Add(pr8)
'cmd.Parameters .Add(pr9)
'cmd.Parameters .Add(pr10)
'cmd.Parameters .Add(pr11)
'cmd.Parameters .Add(pr12)
'cmd.Parameters .Add(pr13)
'cmd.Parameters .Add(pr14)
'cmd.Parameters .Add(pr15)
'cmd.Parameters .Add(pr16)
'cmd.Parameters .Add(pr17)

Dim cmd As New SqlCommand(" sp_InsertOrgani zation ",
sqlAbComm)
cmd.CommandType =CommandType.St oredProcedure
rows = cmd.ExecuteNonQ uery()

This gave me grief - always gettinga stack error about the string
being incorrect. PAIN
Jul 19 '05 #1
2 4182
Thanks for the tip on with cmd.Parameters. I had asked for this in a
previous post with no answer.

"William Ryan" <do********@com cast.nospam.net > wrote in message
news:uQ******** ********@TK2MSF TNGP12.phx.gbl. ..
Depends on how you define 'Beats'. With all due respe t, I don't think you are comparing apples and oranges.

There are a lot of other considerations, but to get the same functionality, the syntax length and complexity is marginal. You could also use bound
controls and with very little effort generate all of that logic with much
less effort.
You can certainly use Parameters in a less verbose syntax ie
With cmd.Parameters
.Add("@orgID", 0)
.Add("@orgName" , txtorgOrgName.T ext)

End With

Since the concatenated string doesn't provide DataType information, you'd be in the same boat.
"Tavish Muldoon" <tm******@splic ed.com> wrote in message
news:e2******** *************** ***@posting.goo gle.com...
What a pain trying to insert data into a table from a stored proc. My
webform asks for 16 pieces of data - which then gets written to the
database.

I found this easier than the crap below (after the ***********).

This was eaiser:

get a list of all the parameters you want to pass - put them in a
string:

i.e.

mysql = "'" & txtorgOrgName.T ext & "'," & ddorgCategory.S electedValue
& ",'" & txtorgAddress.T ext & "','" & _
txtorgCity.Text & "'," & ddorgProvince.S electedValue
& ",'" & txtorgPostal.Te xt & "','" & txtorgPhone1.Te xt & "','" &
txtorgPhoneX1.T ext & "','" & _
txtorgPhone2.Te xt & "','" & txtorgPhoneX2.T ext &
"','" & txtorgFax.Text & "','" & _
txtorgEmail.Tex t & "','" & Now.Date & "','" &
txtorgContact.T ext & "','" & _
txtorgTitle.Tex t & "','" & txtorgDept.Text & "'"

Then put the directions into your command string

Dim cmd As New SqlCommand("EXE CUTE sp_InsertOrgani zation " & mysql,
sqlAbComm)
sqlAbComm.Open( )

Try
'cmd.CommandTex t = "EXECUTE sp_InsertOrgani zation " &
mysql
cmd.CommandType = CommandType.Tex t
rows = cmd.ExecuteNonQ uery()

lblInsert.Visib le = True
lblInsert.Text = "Record ADDED: " & rows

Catch xcp As SqlException

lblInsert.Visib le = True
lblInsert.Text = "Unexpected Exception:" & xcp.ToString

End Try

The stored proc looks like this:

"EXECUTE sp_InsertOrgani zation 'WebCost',1,'50

Havelot','Brigh ton',9,'q2r6t6' ,'555-8787','12','555-9901','22','555-5555','W eb@cost.com','9/3/2003','John
Mckan','VP','Ta x'"

The data after the stored proc gets inserted! Beats the crap below!

Easier.
**************
'insert organization data into table
Dim mysql As String
Dim rows As Integer

'CANNOT INSERT INTO AN ANTONUM / IDENTITY FIELD.
'Dim pr1 As New SqlParameter
'pr1.ParameterN ame = ("@orgId")
'pr1.Direction = ParameterDirect ion.Input
'pr1.DbType = DbType.Int16
'pr1.Value = 0

'Dim pr2 As New SqlParameter
'pr2.ParameterN ame = ("@orgName")
'pr2.Direction = ParameterDirect ion.Input
'pr2.DbType = DbType.String
'pr2.Value = txtorgOrgName.T ext

'Dim pr3 As New SqlParameter
'pr3.ParameterN ame = ("@catId")
'pr3.Direction = ParameterDirect ion.Input
'pr3.DbType = DbType.String
'pr3.Value = ddorgCategory.D ataValueField

'Dim pr4 As New SqlParameter
'pr4.ParameterN ame = ("@orgAddres s")
'pr4.Direction = ParameterDirect ion.Input
'pr4.DbType = DbType.String
'pr4.Value = txtorgAddress.T ext

'Dim pr5 As New SqlParameter
'pr5.ParameterN ame = ("@orgCity")
'pr5.Direction = ParameterDirect ion.Input
'pr5.DbType = DbType.String
'pr5.Value = txtorgCity.Text

'Dim pr6 As New SqlParameter
'pr6.ParameterN ame = ("@orgProvince" )
'pr6.Direction = ParameterDirect ion.Input
'pr6.DbType = DbType.Int16
'pr6.Value = ddorgProvince.D ataValueField

'Dim pr7 As New SqlParameter
'pr7.ParameterN ame = ("@orgPostalCod e")
'pr7.Direction = ParameterDirect ion.Input
'pr7.DbType = DbType.String
'pr7.Value = txtorgPostal.Te xt

'Dim pr8 As New SqlParameter
'pr8.ParameterN ame = ("@orgPhone1 ")
'pr8.Direction = ParameterDirect ion.Input
'pr8.DbType = DbType.String
'pr8.Value = txtorgPhone1.Te xt

'Dim pr9 As New SqlParameter
'pr9.ParameterN ame = ("@orgPhone1Ext ")
'pr9.Direction = ParameterDirect ion.Input
'pr9.DbType = DbType.String
'pr9.Value = txtorgPhoneX1.T ext

'Dim pr10 As New SqlParameter
'pr10.Parameter Name = ("@orgPhone2 ")
'pr10.Direction = ParameterDirect ion.Input
'pr10.DbType = DbType.String
'pr10.Value = txtorgPhone2.Te xt

'Dim pr11 As New SqlParameter
'pr11.Parameter Name = ("@orgPhone2Ext ")
'pr11.Direction = ParameterDirect ion.Input
'pr11.DbType = DbType.String
'pr11.Value = txtorgPhoneX2.T ext

'Dim pr12 As New SqlParameter
'pr12.Parameter Name = ("@orgFaxNumber ")
'pr12.Direction = ParameterDirect ion.Input
'pr12.DbType = DbType.String
'pr12.Value = txtorgFax.Text

'Dim pr13 As New SqlParameter
'pr13.Parameter Name = ("@orgEmail" )
'pr13.Direction = ParameterDirect ion.Input
'pr13.DbType = DbType.String
'pr13.Value = txtorgEmail.Tex t

'Dim pr14 As New SqlParameter
'pr14.Parameter Name = ("@orgDateRegis tered")
'pr14.Direction = ParameterDirect ion.Input
'pr14.DbType = DbType.Date
'pr14.Value = Now.Date

'Dim pr15 As New SqlParameter
'pr15.Parameter Name = ("@orgContactPe rson")
'pr15.Direction = ParameterDirect ion.Input
'pr15.DbType = DbType.String
'pr15.Value = txtorgContact.T ext

'Dim pr16 As New SqlParameter
'pr16.Parameter Name = ("@orgTitle" )
'pr16.Direction = ParameterDirect ion.Input
'pr16.DbType = DbType.String
'pr16.Value = txtorgTitle.Tex t

'Dim pr17 As New SqlParameter
'pr17.Parameter Name = ("@orgDept")
'pr17.Direction = ParameterDirect ion.Input
'pr17.DbType = DbType.String
'pr17.Value = txtorgDept.Text

''Dim insertedrows As SqlParameter
''insertedrows. ParameterName = ("@@IDENTITY ")
''insertedrows. Direction = ParameterDirect ion.ReturnValue
''insertedrows. DbType = DbType.Int16
''rows = insertedrows.Va lue
''cmd.Parameter s.Add(pr1)
'cmd.Parameters .Add(pr2)
'cmd.Parameters .Add(pr3)
'cmd.Parameters .Add(pr4)
'cmd.Parameters .Add(pr5)
'cmd.Parameters .Add(pr6)
'cmd.Parameters .Add(pr7)
'cmd.Parameters .Add(pr8)
'cmd.Parameters .Add(pr9)
'cmd.Parameters .Add(pr10)
'cmd.Parameters .Add(pr11)
'cmd.Parameters .Add(pr12)
'cmd.Parameters .Add(pr13)
'cmd.Parameters .Add(pr14)
'cmd.Parameters .Add(pr15)
'cmd.Parameters .Add(pr16)
'cmd.Parameters .Add(pr17)

Dim cmd As New SqlCommand(" sp_InsertOrgani zation ",
sqlAbComm)
cmd.CommandType =CommandType.St oredProcedure
rows = cmd.ExecuteNonQ uery()

This gave me grief - always gettinga stack error about the string
being incorrect. PAIN


Jul 19 '05 #2
Sure, but what happens when you are passing input from user fields to the
stored procedure and the user inputs special characters like [']. Are you
going to do a replace("'","'' '") every time you want to pass the data? I
found it a pain to deal with checking to make sure "Brian D'Amico" was not
passed to my stored proceedure every time it was called.

"Tavish Muldoon" <tm******@splic ed.com> wrote in message
news:e2******** *************** ***@posting.goo gle.com...
What a pain trying to insert data into a table from a stored proc. My
webform asks for 16 pieces of data - which then gets written to the
database.

I found this easier than the crap below (after the ***********).

This was eaiser:

get a list of all the parameters you want to pass - put them in a
string:

i.e.

mysql = "'" & txtorgOrgName.T ext & "'," & ddorgCategory.S electedValue
& ",'" & txtorgAddress.T ext & "','" & _
txtorgCity.Text & "'," & ddorgProvince.S electedValue
& ",'" & txtorgPostal.Te xt & "','" & txtorgPhone1.Te xt & "','" &
txtorgPhoneX1.T ext & "','" & _
txtorgPhone2.Te xt & "','" & txtorgPhoneX2.T ext &
"','" & txtorgFax.Text & "','" & _
txtorgEmail.Tex t & "','" & Now.Date & "','" &
txtorgContact.T ext & "','" & _
txtorgTitle.Tex t & "','" & txtorgDept.Text & "'"

Then put the directions into your command string

Dim cmd As New SqlCommand("EXE CUTE sp_InsertOrgani zation " & mysql,
sqlAbComm)
sqlAbComm.Open( )

Try
'cmd.CommandTex t = "EXECUTE sp_InsertOrgani zation " &
mysql
cmd.CommandType = CommandType.Tex t
rows = cmd.ExecuteNonQ uery()

lblInsert.Visib le = True
lblInsert.Text = "Record ADDED: " & rows

Catch xcp As SqlException

lblInsert.Visib le = True
lblInsert.Text = "Unexpected Exception:" & xcp.ToString

End Try

The stored proc looks like this:

"EXECUTE sp_InsertOrgani zation 'WebCost',1,'50
Havelot','Brigh ton',9,'q2r6t6' ,'555-8787','12','555-9901','22','555-5555','W
eb@cost.com','9/3/2003','John Mckan','VP','Ta x'"

The data after the stored proc gets inserted! Beats the crap below!

Easier.
**************
'insert organization data into table
Dim mysql As String
Dim rows As Integer

'CANNOT INSERT INTO AN ANTONUM / IDENTITY FIELD.
'Dim pr1 As New SqlParameter
'pr1.ParameterN ame = ("@orgId")
'pr1.Direction = ParameterDirect ion.Input
'pr1.DbType = DbType.Int16
'pr1.Value = 0

'Dim pr2 As New SqlParameter
'pr2.ParameterN ame = ("@orgName")
'pr2.Direction = ParameterDirect ion.Input
'pr2.DbType = DbType.String
'pr2.Value = txtorgOrgName.T ext

'Dim pr3 As New SqlParameter
'pr3.ParameterN ame = ("@catId")
'pr3.Direction = ParameterDirect ion.Input
'pr3.DbType = DbType.String
'pr3.Value = ddorgCategory.D ataValueField

'Dim pr4 As New SqlParameter
'pr4.ParameterN ame = ("@orgAddres s")
'pr4.Direction = ParameterDirect ion.Input
'pr4.DbType = DbType.String
'pr4.Value = txtorgAddress.T ext

'Dim pr5 As New SqlParameter
'pr5.ParameterN ame = ("@orgCity")
'pr5.Direction = ParameterDirect ion.Input
'pr5.DbType = DbType.String
'pr5.Value = txtorgCity.Text

'Dim pr6 As New SqlParameter
'pr6.ParameterN ame = ("@orgProvince" )
'pr6.Direction = ParameterDirect ion.Input
'pr6.DbType = DbType.Int16
'pr6.Value = ddorgProvince.D ataValueField

'Dim pr7 As New SqlParameter
'pr7.ParameterN ame = ("@orgPostalCod e")
'pr7.Direction = ParameterDirect ion.Input
'pr7.DbType = DbType.String
'pr7.Value = txtorgPostal.Te xt

'Dim pr8 As New SqlParameter
'pr8.ParameterN ame = ("@orgPhone1 ")
'pr8.Direction = ParameterDirect ion.Input
'pr8.DbType = DbType.String
'pr8.Value = txtorgPhone1.Te xt

'Dim pr9 As New SqlParameter
'pr9.ParameterN ame = ("@orgPhone1Ext ")
'pr9.Direction = ParameterDirect ion.Input
'pr9.DbType = DbType.String
'pr9.Value = txtorgPhoneX1.T ext

'Dim pr10 As New SqlParameter
'pr10.Parameter Name = ("@orgPhone2 ")
'pr10.Direction = ParameterDirect ion.Input
'pr10.DbType = DbType.String
'pr10.Value = txtorgPhone2.Te xt

'Dim pr11 As New SqlParameter
'pr11.Parameter Name = ("@orgPhone2Ext ")
'pr11.Direction = ParameterDirect ion.Input
'pr11.DbType = DbType.String
'pr11.Value = txtorgPhoneX2.T ext

'Dim pr12 As New SqlParameter
'pr12.Parameter Name = ("@orgFaxNumber ")
'pr12.Direction = ParameterDirect ion.Input
'pr12.DbType = DbType.String
'pr12.Value = txtorgFax.Text

'Dim pr13 As New SqlParameter
'pr13.Parameter Name = ("@orgEmail" )
'pr13.Direction = ParameterDirect ion.Input
'pr13.DbType = DbType.String
'pr13.Value = txtorgEmail.Tex t

'Dim pr14 As New SqlParameter
'pr14.Parameter Name = ("@orgDateRegis tered")
'pr14.Direction = ParameterDirect ion.Input
'pr14.DbType = DbType.Date
'pr14.Value = Now.Date

'Dim pr15 As New SqlParameter
'pr15.Parameter Name = ("@orgContactPe rson")
'pr15.Direction = ParameterDirect ion.Input
'pr15.DbType = DbType.String
'pr15.Value = txtorgContact.T ext

'Dim pr16 As New SqlParameter
'pr16.Parameter Name = ("@orgTitle" )
'pr16.Direction = ParameterDirect ion.Input
'pr16.DbType = DbType.String
'pr16.Value = txtorgTitle.Tex t

'Dim pr17 As New SqlParameter
'pr17.Parameter Name = ("@orgDept")
'pr17.Direction = ParameterDirect ion.Input
'pr17.DbType = DbType.String
'pr17.Value = txtorgDept.Text

''Dim insertedrows As SqlParameter
''insertedrows. ParameterName = ("@@IDENTITY ")
''insertedrows. Direction = ParameterDirect ion.ReturnValue
''insertedrows. DbType = DbType.Int16
''rows = insertedrows.Va lue
''cmd.Parameter s.Add(pr1)
'cmd.Parameters .Add(pr2)
'cmd.Parameters .Add(pr3)
'cmd.Parameters .Add(pr4)
'cmd.Parameters .Add(pr5)
'cmd.Parameters .Add(pr6)
'cmd.Parameters .Add(pr7)
'cmd.Parameters .Add(pr8)
'cmd.Parameters .Add(pr9)
'cmd.Parameters .Add(pr10)
'cmd.Parameters .Add(pr11)
'cmd.Parameters .Add(pr12)
'cmd.Parameters .Add(pr13)
'cmd.Parameters .Add(pr14)
'cmd.Parameters .Add(pr15)
'cmd.Parameters .Add(pr16)
'cmd.Parameters .Add(pr17)

Dim cmd As New SqlCommand(" sp_InsertOrgani zation ",
sqlAbComm)
cmd.CommandType =CommandType.St oredProcedure
rows = cmd.ExecuteNonQ uery()

This gave me grief - always gettinga stack error about the string
being incorrect. PAIN

Jul 19 '05 #3

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

Similar topics

7
9001
by: Bill Kellaway | last post by:
Hi there - this should be fairly simple for someone. Basically I can't figure out how to pass the parameters from ASP to a Stored Procedure on SQL. Here's my code: I just need to help in learning how to pass these varibables from ASP to the SP.
3
2433
by: Suzanne | last post by:
Hi All I'm having problems getting my data adapter to throw a concurrency exception with an INSERT command. I want to throw a concurrency exception if an attempt is made to enter a row into tb_table when a row with the same int_UID already exists in there. Here is my stored procedure: if not exists (select int_UID from tb_table where...
2
3322
by: Eli | last post by:
Hi all We currently have a strange problem with calling a Stored Procedure (SQL Database) in our C# Project. The only error I get is "System error" which says a lot :) Background: We have several stored procedures to Insert and update datas in our SQL database. Some stored procedures are smaller (insert datas in only one table) and some...
6
2061
by: Lelle | last post by:
Hello ! how can i insert text containg code examples from a textbox into a database using SQL insert statment. i have no problem to just add text that dont contains code and script examples or the illegal chars for the insert command is it possible to encasulate the text/string so the server doesnt reads the string as a command?
0
3722
by: Scarab | last post by:
Hi all, When I use following sql to get data in stored procedure, error occurs: insert into #tmp EXECUTE dbo.prc_1 @date1,@date1 Here is the source code, Thanks CREATE TABLE ( NULL , NULL ) ON
6
9890
by: Peter Neumaier | last post by:
Hi, I am trying to select some data through a stored procedure and would like to store the result in a local access table. Is that possible? Can somebody provide an example? Thanks&regards! Peter
2
3676
by: wombat53 | last post by:
Hi Group Are there any DB2 UDB ESE DPF V8.2 users exploiting "buffered inserts" (BIND parm INSERT BUF) *and* "multi-row INSERTS" (many rows associated with the VALUES clause of the INSERT to minimize number of calls to the RDMBS engine) in an SQL PL Stored Procedure? I ask, as the latter would imply embedded DYNAMIC SQL due to potentially...
1
6120
by: sheenaa | last post by:
Hello Members, I m creating my application forms in ASP.Net 2005 C# using the backend SQL Server 2005. What i have used on forms :: ? On my first form i have used some label,textboxs,dropdownlists,radiobutton and checkbox asp standard controls. On the click event of the command button the data gets stored into the...
6
6267
by: pretzla | last post by:
I have a PL/SQL script where I load data from a stored procedure into bind variables. Then, I insert that data from the bind variables into an Oracle table with a simple insert statement. The execution of the stored procedure and the insert are in a FOR-LOOP. insert into ccd_t (acct_id, acct_seq_no, acct_btn) values
0
7900
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7832
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...
0
8192
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. ...
0
8332
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...
0
8204
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6592
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...
0
5382
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3828
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...
0
3853
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.