Inserting into table (error!)

Hello all!  I'm having a problem inserting into a table in my DB.  I've done inserts many times before and this is the first time I'm getting this sort of error.  When I fire off the button click event, I get an error stating: 

ORA-00984: column not allowed here

Here is my insert code:
Dim strInsert As String 

strInsert = "INSERT INTO LIBRARY(TITLE, SUBJECT_ID, LOC1, LOC2) VALUES("
strInsert = strInsert + grabText(txtTitle.Text) + ",'" + lstSub.SelectedValue + "','" + lstLoc1.SelectedValue + "','" + grabText(txtLoc2.Text) + "')"
Response.Write(strInsert)
Dim InsertCommandLibrary As New OracleClient.OracleCommand
InsertCommandLibrary.CommandText = strInsert
InsertCommandLibrary.CommandType = CommandType.Text
InsertCommandLibrary.Connection = OracleConnection1
InsertCommandLibrary.ExecuteNonQuery()
I looked over my SQL string b/c I figured that's where my problem lies, but I cannot find anything that is wrong (at least I can't see it). If anyone has any suggestions I'd greatly appreciate it. Thank you.
0
KamyarM
8/12/2003 3:46:42 PM
asp.net.oracle 2269 articles. 0 followers. Follow

2 Replies
626 Views

Similar Articles

[PageSpeed] 31

Unless TITLE is a numeric field, you need single quotes around it.
0
Stephen
8/12/2003 4:47:41 PM
Hi,

What is the resulting sql string?
Thanks
Greg
0
greg
8/18/2003 2:15:49 AM
Reply:

Similar Artilces:

Is having a trigger that inserts a row in Table 'A', when a row in same table is inserted by ADo.Net code?
I want to insert a row for a Global user  in Table 'A' whenever ADO.Net code inserts a Local user row into same table. I recommended using a trigger to implement this functionality, but the DBA was against it, saying that stored proecedures should be used, since triggers are unreliable and slow down the system by placing unecessary locks on the table. Is this true OR the DBA is saying something wrong? My thinking is that Microsoft will never include triggers if they are unreliable and the DBA is just wanting to offload the extra DBA task of triggers to the programmer so that a s...

inserting data into oracle tables
Hey folks. Been a while since I used a datawindow (Powerbuilder version 6.5 was the last time actually) - so excuse for being somewhat of a DW.NET noob. Anyway, I have the eval version of DW.NET (both 1.0 and 1.5beta2) in two separate Windows 2003 server virtual machines. I have created an oracle 9 datasource, connected to it, and built a datawindow that looks at a 2 column table. Problem is that I can't seem to insert a row. In the datawindow painter, in the preview panel - it lists rows from the underlying table. If I right click in the preview panel, the "Insert" m...

Oracle Error while trying to connect to oracle tables
------=_NextPart_000_0029_01C1EE17.39628160 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have this program that will work for me as I have my environment = variables set properly in my .profile. Problem is, this needs to be run = by lots of people and I'm trying to avoid having all these people have = to change their .profiles to add the Oracle environment variables. Let's = just say, some of these people are at level -1 on an AIX box and I don't = have root access to make the changes myself. Here is the part ...

Inserting Data Into Two Tables (Getting ID from Table 1 and inserting into Table 2)
I am trying to insert data into two different tables. I will insert into Table 2 based on an id I get from the Select Statement from Table1.  Insert Table1(Title,Description,Link,Whatever)Values(@title,@description,@link,@Whatever)Select WhateverID from Table1 Where Description = @DescriptionInsert into Table2(CategoryID,WhateverID)Values(@CategoryID,@WhateverID)  This statement is not working. What should I do? Should I use a stored procedure?? I am writing in C#. Can someone please help!!  Insert Table1(Title,Description,Link,Whatever)Values(@title,@descri...

DBD::Oracle gives "Use of uninitialized error at /.../Oracle.pm line 327 on tables()
I use DBIx::Recordset but every time I invoke it with perl 5.6.1 and DBD::Oracle 1.12, I see this: Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.6.1/i386-linux/DBD/Oracle.pm line 327. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.6.1/i386-linux/DBD/Oracle.pm line 327. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.6.1/i386-linux/DBD/Oracle.pm line 327. I traced this down to the method $dbh->tables(), which in turn invokes table_info() (which is driver specific), which is where line 327 is. a clean test ca...

OPENROWSET (INSERT) Insert Error: Column name or number of supplied values does not match table definition.
Is there a way to avoid entering column names in the excel template for me to create an excel file froma  dynamic excel using openrowset. I have teh following code but it works fien when column names are given ahead of time. If I remove the column names from the template and just to Select * from the table and Select * from sheet1 then it tells me that column names donot match.  Server: Msg 213, Level 16, State 5, Line 1Insert Error: Column name or number of supplied values does not match table definition. here is my code... SET @sql1='select * from table1'SET @sql2=&#...

Inserting Data into multiple tables in Oracle Database by pressing single "Insert" button in FormView
Hi,I am totally new in ASP.NET.I have a query which may be very foolish to all of you but despite I'll be really thankfull if I get the answer urgently.PROBLEM: described in following steps...1) I have 3 tables in database       A) employees : containing columns :: (emp_code,emp_name,dept)      B) emp_prof_qualifications : containg columns::(emp_code,prof_qualification_id)      C) professional_qualifications : contain columns::(prof_qualification_id,professional_qualification) 2) I have got a single interface w...

DetailsView Insert Error: Cannot insert the value NULL into column 'customer', table 'DEMO
Using VWD Express edition creates a page(Default.aspx) with a Dropdownlist for selecting a customer and a GridView to show the details of the selected customer and to edit and delect a customer's detail. I add a button to link to page Add.aspx for add a new record. I add a DetailsView and the following code so it goes to New record mode when page loads:        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)               DetailsView1.ChangeMode(Det...

Cannot INSERT data to 3 tables linked with relationship (INSERT statement conflicted with the FOREIGN KEY constraint error)
Hello  I have a problem with setting relations properly when inserting data using adonet. Already have searched for a solutions, still not finding a mistake... Here's the sql management studio diagram :  and here goes the  code1 DataSet ds = new DataSet(); 2 3 SqlDataAdapter myCommand1 = new SqlDataAdapter("select * from SurveyTemplate", myConnection); 4 SqlCommandBuilder cb = new SqlCommandBuilder(myCommand1); 5 myCommand1.FillSchema(ds, SchemaType.Source); 6 DataTable pTable = ds.Tables["Table"]; 7 pTable.TableName = "SurveyTemplate"; 8 m...

How do i insert the details from one table to another in microsoft access???my codings shows no error but its unable to insert..help!!
Heres my coding:Private Sub AddCustHist() Dim TodayDate As String = Date.Today Dim str2 As String = "INSERT INTO History SELECT * From Cart AND PurchaseDate= '" + TodayDate + "'" Dim dbm2 As New OleDbCommand(str2, cnn) Dim dbr2 As OleDbDataReader Try cnn.Open() dbr2 = dbm2.ExecuteReader()   Catch ex As Exception Finally If Not dbm2 Is Nothing Then dbm2.Dispose() End If If Not dbr2 Is Nothing Then dbr2.Close() End If If Not cnn Is Nothing Then cnn.Close() cnn.Dispose()   End If End Try End Sub------------------------------------------------------------------...

On Record Inserted in table a, Insert record in table b
 Hi Guys, I have heard that is is possible to write a script (stored procedure) that my MS SQL Server creates a record in table b for every record in table a.e.g.I insert "CustomerNr"  [pk] and "CustomerName" in table a and I want that this "CustomerNr" is now used to create a row in table b (where there are only update queries and no insert queries).is that possible?many thankspolynaux  You can use a trigger in the tablea insert command to insert a new row in  the tablebVikram www.vikramlakhotia.comPlease mark the answer if it helped ...

Oracle error occurred, but error message could not be retrieved from Oracle.
Trying to connect to an Oracle 8i database via Oledb, must use ole-db for the time being and can't use the OracleClient managed provider just yet. I have scoured the net and ensured that the oracle home var is in the env vars, and i've given necessary permissions to IUSR_ account for the ora92 directory. There were no other suggestions i could find, please help if you've come across this and the resolution. I have Oracle client version 8.1.7, win 2k pro, .Net 1.1 framework, I can post my inventory Contents if it'll help diagnose the problem. please help if you can. thanks, ro...

Oracle error occurred, but error message could not be retrieved from Oracle
I have a problem with oracle while accessing from VB program and ASP/ASP.net pages. Every day first time i access the pages or program it says "Oracle error occurred, but error message could not be retrieved from Oracle". after refreshing around 10 to 15 times it works properly for the day.Again in the next day same error occurrs. what could be the reason? I have multiple version of MDAC loaded in my machine, latest is MDAC 2.8. Normally it happens when i try to open the connection ie, Con.openThe quality of our thinking will determine the quality of our future I have seen ...

Re: Std.'ized error codes (was "insert into two table and check table perl DBI")
> A few months ago we had discussed on this list _standardizing_ error > handling for things like trying to insert duplicate records, but I kind > of dropped the ball - changing jobs and all didn't leave me enough time > to persue that standardization with members of this list. And since now > I don't use Perl in my new job, I don't have time to persue it at all. > Anyone else have time to revisit standardizing error handling for things > like "Trying to insert duplicate record"??? Basically all it involved > was putting together a list o...

Web resources about - Inserting into table (error!) - asp.net.oracle

Inserting Kate
jurvetson posted a photo: the speaking GPS avatar that we came to love.. more prep photos below... You can hear her voice in the video compilation ...

Inserting the Galaxy Note 5’s S Pen backwards can permanently damage the device
One of the features Samsung highlighted when it unveiled the Galaxy Note 5 was the device's new S Pen slot design. The Note 5 features a spring-loaded ...


Inserting Slavery Into The Climate Debate
Chris Hayes compares the fight against fossil fuels to the abolitionist movement. He states plainly that “there is absolutely no conceivable ...

Samsung smart TVs inserting ads into third-party apps
... playback have pissed off a number of consumers. People with smart TVs from Samsung have been complaining that the electronics maker is inserting ...

Inserting images into Gmail could be so much better
When Google first launched the new compact compose window in Gmail, many of you might have noticed something annoying about inserting images. ...

Gawker tells Steven Crowder to "stop whining, take your licks, and accept that getting hit in the face ...
"... in the middle of an argument between billionaire-funded know-nothing ideologues and people whose livelihoods and stability are being threatened ...

Gmail's New Interface for Inserting Photos
Gmail has a new interface for adding images to a message. When you click the "insert images" icon, Gmail now shows all the photos highlighted ...

Now Samsung SmartTVs are interrupting users' videos by inserting random ads
... room. Now Samsung is dealing with a new headache: Gigaom reports that Samsung SmartTVs are interrupting users' own video content by inserting ...

Samsung SmartTVs are inserting ads into movies - Business Insider
Random Pepsi pop-up ads have been appearing when SmartTV users watch content through the device's third-party apps.

Resources last updated: 11/28/2015 2:15:14 AM