Search Results

Search found 8267 results on 331 pages for 'insert'.

Page 4/331 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Check value at insert

    - by ThreeFingerMark
    Hello, i have this three tables. Table: Item Columns: ItemID, Title, Content, NoChange (Date) Table: Tag Columns: TagID, Title Table: ItemTag Columns: ItemID, TagID In the Item Table is a Field with NoChange, if this field = true no Tag is allowed to insert a ItemTag value with this ItemID. How can i check this in the insert? For Updates i have this Statement: UPDATE ItemTag SET TagID = ? where ItemID = ? AND TagID = ? AND exists ( select ItemID from Item where ItemID = ? AND NoChange is null)"); Thank you.

    Read the article

  • MySQL Many to Many with Unique keys and Update/Select if Exists otherwise Insert

    - by Jayrox
    In my goal to have a Many-to-Many relationship in my MySQL database I have arrived at another bridge to build. Current Tables: Users (id, name) Tags (id, name) User_Tags (user_id, tag_id) Here is the goal: I would like to have the ability to take a tag i.e: #fb and insert it into my Tags database which has a unique constraint on name and if the tag exists I would like to return it's id I would like to insert the tag.id and the current user's user.id into User_Tags. I do not have any unique constraints on the User_Tags table because I would like to be able to track the user's most commonly used tags and present them in a list ordered by frequency of use. I am currently developing this project in PHP using prepared statements. Additionally, performance is not currently an issue as my user count is still fairly small, but it is steadily growing and may be an issue in the future.

    Read the article

  • Inserting records in Mysql with INSERT IGNORE and NULL values

    - by Homer1980ar
    I have a partitioned table InnoDB with several fields. I'm trying to avoid duplicates on insert. Let's say: Field1 int null Field2 int null Field3 int null Field4 int null Field5 int null I have created a UNIQUE index on those fields. I try to insert some records with NULL values and then try to reinsert them with IGNORE feature on MySql. Unfortunately it seems to replicated the records when using NULL values. If I try with zeros instead of NULL cases everything works, but I do need the nulls there. Any idea? Thanks, Leonardo

    Read the article

  • how to insert based on the date

    - by Gaolai Peng
    I have a table table1 (account, last_contact_date, insert_date), account and last_contact_date are primary keys. The insert_date is set with the time the recored being added by calling getdate(). I also have a temporary table #temp(account, last_contact_date) which I use to update the table1. Here are sample data: table1 account last_contact_date insert_date 1 2012-09-01 2012-09-28 2 2012-09-01 2012-09-28 3 2012-09-01 2012-09-28 #temp account last_contact_date 1 2012-09-27 2 2012-09-27 3 2012-08-01 The result table depends on the inserting date. If the date is 2012-09-28, the result will be table1 account last_contact_date insert_date 1 2012-09-27 2012-09-28 2 2012-09-27 2012-09-28 3 2012-09-01 2012-09-28 If the date is 2012-09-29, the result will be table1 account last_contact_date insert_date 1 2012-09-01 2012-09-28 2 2012-09-01 2012-09-28 3 2012-09-01 2012-09-28 1 2012-09-27 2012-09-29 2 2012-09-27 2012-09-29 Basically the rule is (1) if the inserting date is the same day, i will pick the lastest last_contact_date, otherwise, (2) if the last_contact_date is later than the current last_contact_date, I will insert a new one. How do I write a query for this insert?

    Read the article

  • Insert new row with data computed from other rows

    - by Tyler McHenry
    Suppose I have a MySQL table called MyTable, that looks like this: +----+------+-------+ | Id | Type | Value | +----+------+-------+ | 0 | A | 1 | | 0 | B | 1 | | 1 | A | 2 | | 1 | B | 3 | | 2 | A | 5 | | 2 | B | 8 | +----+------+-------+ And, for each Id, I want to insert a new row with type C whose Value is the sum of the type A and B values for the rows of the same Id. The primary key on this table is (Id, Type), so there's no question of duplication of Id,Type pairs. I can create the rows I want with this query: SELECT MyTable_A.Id AS Id, 'C' AS Type, (A_Val + B_Val) AS Value FROM (SELECT Id, Value AS A_Val FROM MyTable WHERE Type='A') AS MyTable_A JOIN (SELECT Id, Value AS B_Val FROM MyTable WHERE Type='B') AS MyTable_B ON MyTable_A.Id = MyTable_B.Id Giving: +----+------+-------+ | Id | Type | Value | +----+------+-------+ | 0 | C | 2 | | 1 | C | 5 | | 2 | C | 13 | +----+------+-------+ But the question is: How do I use this result to insert the generated type-C rows into MyTable? Is there a relatively simple way to do this with a query, or do I need to write a stored procedure? And if the latter, guidance would be helpful, as I'm not too well versed in them.

    Read the article

  • mysqli insert into database

    - by Simon
    Hello all i have this script and i will not insert into the database and i get no errors :S, do you know what it is? function createUser($username, $password) { $mysql = connect(); if($stmt = $mysql->prepare('INSERT INTO users (username, password, alder, hood, fornavn, efternavn, city, ip, level, email) VALUES (?,?,?,?,?,?,?,?,?,?)')) { $stmt->bind_param('ssssssssss',$username,$password, $alder, $hood, $fornavn, $efternavn, $city, $ip, $level, $email); $stmt->execute(); $stmt->close(); } else { echo 'error: ' . $mysql->error; }

    Read the article

  • SQL query INSERT not working inserting values into my DB.

    - by Aiden Ryan
    Hello, I'm trying to insert registration data into a database but my php code isn't inserting the values into the DB although I'm not getting any errors either, can someone help me? this is the code i'm currently using: $connect = mysql_connect("localhost","myusername","mypassword"); mysql_select_db("application"); $queryreg = mysql_query('INSERT INTO users("username","password","email","date") VALUES("$username","$password","$email","$date")'); die ("You Have Been Registered."); I just need to add the username password email and date into the fields i have specified but it won't work, please someone help!

    Read the article

  • ASP.NET/VB/SQL: trying to insert data, getting error "no value given for required parameters"

    - by Sara
    I am pretty sure this is a basic syntax error, I am new at this and basically figuring things out by trial and error... I am trying to insert data from textboxes into an Access database, where the primary key fields in tableCourse are prefix and course_number. It keeps giving me the "no value given for one or more required parameters" error. Here is my codebehind: Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard1.FinishButtonClick 'Collect Data Dim myDept = txtDept.Text Dim myFirst = txtFirstName.Text Dim myLast = txtLastName.Text Dim myPrefix = txtCoursePrefix.Text Dim myNum = txtCourseNum.Text 'Define Connection Dim myConn As New OleDbConnection myConn.ConnectionString = AccessDataSource1.ConnectionString 'Create commands Dim myIns1 As New OleDbCommand("INSERT INTO tableCourse (department, name_first, name_last, prefix, course_number) VALUES (@myDept, @myFirst, @myLast, @myPrefix, @myNum)", myConn) 'Execute the commands myConn.Open() myIns1.ExecuteNonQuery() End Sub

    Read the article

  • Linked List. Insert integers in order

    - by user69514
    I have a linked list of integers. When I insert a new Node I need to insert it not at the end, but in oder... i.e. 2, 4, 5, 8, 11, 12, 33, 55, 58, 102, etc. I don't think I am inserting it in the correct position. Do see what Im doing wrong? Node newNode = new Node(someInt); Node current = head; for(int i=0; i<count; i++){ if(current == tail && tail.data < someInt){ tail.next = newNode; } if(current.data < someInt && current.next.data >= someInt){ newNode.next = current.next; current.next = newNode; } }

    Read the article

  • Insert date and time into Mysql

    - by Jerry
    Hi..guys I am trying to insert date and time into mysql datetime field. When a user select a date and time, it will generate two POST variables. I have searched internet but still not sure how to do it. My code. //date value is 05/25/2010 //time value is 10:00 $date=$_POST['date']; $time=$_POST['time']; $datetime=$date.$time If I insert $datetime into mysql, the date appears to be 0000-00-00:00:00:00 I appreciate it if anyone could help me about this. Thanks.

    Read the article

  • Generating incremental numeric column values during INSERT SELECT statement

    - by Charles
    I need to copy some data from one table to another in Oracle, while generating incremental values for a numeric column in the new table. This is a once-only exercise with a trivial number of rows (100). I have an adequate solution to this problem but I'm curious to know if there is a more elegant way. I'm doing it with a temporary sequence, like so: CREATE SEQUENCE temp_seq START WITH 1; INSERT INTO new_table (new_col, copied_col1, copied_col2) SELECT temp_seq.NEXTVAL, o.* FROM (SELECT old_col1, old_col2 FROM old_table) o; DROP SEQUENCE temp_seq; Is there way to do with without creating the sequence or any other temporary object? Specifically, can this be done with a self-contained INSERT SELECT statement? There are similar questions, but I believe the specifics of my question are original to SO.

    Read the article

  • Getting SQL Syntax Error in INSERT INTO statement in Access 2010

    - by hello123
    I have written the following Insert Into statement in Access 2010 VBA: Private Sub AddBPSSButton_Click() ' CurrentDb.Execute "INSERT INTO TabClearDetail(C_Site) VALUES(" & Me.C_Site & ")" Dim strSQL As String 'MsgBox Me.[Clearance Applying For] 'MsgBox Me.[Contract Applying for] 'MsgBox Me.[C_Site] 'MsgBox Me.[C_SponsorSurname] 'MsgBox Me.[C_SponsorForename] 'MsgBox Me.[C_SponsorContactDetails] 'MsgBox Me.[C_EmploymentDetail] 'MsgBox Me.[C_SGNumber] 'MsgBox Me.[C_REF1DateRecd] 'MsgBox Me.[C_REF2DateRecd] 'MsgBox Me.[C_IDDateRecd] 'MsgBox Me.[C_IDNum] 'MsgBox Me.[C_CriminalDeclarationDate] 'MsgBox Me.[Credit Check Consent] 'MsgBox Me.[C_CreditCheckDate] 'MsgBox Me.[Referred for Management Decision] 'MsgBox Me.[Management Decision Date] 'MsgBox Me.[C_Comment] 'MsgBox Me.[C_DateCleared] 'MsgBox Me.[C_ClearanceLevel] 'MsgBox Me.[C_ContractAssigned] 'MsgBox Me.[C_ExpiryDate] 'MsgBox Me.[C_LinKRef] 'MsgBox Me.[C_OfficialSecretsDate] strSQL = "INSERT INTO TabClearDetail(Clearance Applying For, Contract Applying for, " & _ "C_Site, C_SponsorSurname, C_SponsorForename, C_SponsorContactDetails, C_EmploymentDetail, " & _ "C_SGNumber, C_REF1DateRecd, C_RED2DateRecd, C_IDDateRecd, C_IDNum, " & _ "C_CriminalDeclarationDate, Credit Check Consent, C_CreditCheckDate, Referred for Management Decision, " & _ "Management Decision Date, C_Comment, C_DateCleared, C_ClearanceLevel, C_ContractAssigned, " & _ "C_ExpiryDate, C_LinkRef, C_OfficialSecretsDate) VALUES('" & Me.[Clearance Applying For] & "', " & _ "'" & Me.[Contract Applying for] & "', '" & Me.[C_Site] & "', '" & Me.[C_SponsorSurname] & "', " & _ "'" & Me.[C_SponsorForename] & "', '" & Me.[C_SponsorContactDetails] & "', " & _ "'" & Me.[C_EmploymentDetail] & "', '" & Me.[C_SGNumber] & "', '" & Me.[C_REF1DateRecd] & "', " & _ "'" & Me.[C_REF2DateRecd] & "', '" & Me.[C_IDDateRecd] & "', '" & Me.[C_IDNum] & "', " & _ "'" & Me.[C_CriminalDeclarationDate] & "', '" & Me.[Credit Check Consent] & "', '" & Me.[C_CreditCheckDate] & "', " & _ "'" & Me.[Referred for Management Decision] & "', '" & Me.[Management Decision Date] & "', " & _ "'" & Me.[C_Comment] & "', '" & Me.[C_DateCleared] & "', '" & Me.[C_ClearanceLevel] & "', " & _ "'" & Me.[C_ContractAssigned] & "', '" & Me.[C_ExpiryDate] & "', '" & Me.[C_LinKRef] & "', " & _ "'" & Me.[C_OfficialSecretsDate] & "');" DoCmd.RunSQL (strSQL) 'MsgBox strSQL End Sub All The MsgBox calls work, so I believe I have typed all column names and text box names correctly. I am getting a Syntax error when I get to the DoCmd.RunSQL line. Have been staring at this for quite a while trying to see if I have missed a comma or speech mark or something, but am hoping maybe another set of eyes will see my mistake. Any help will be greatly appreciated. Thanks!

    Read the article

  • how to insert multiple rows using cakephp

    - by Paul
    In the cakePHP project I'm building, I want to insert a defined number of identical records. These will serve as placeholders records that will have additional data added later. Each record will insert the IDs taken from two belongs_to relationships as well as two other string values. What I want to do is be able to enter a value for the number of records I want created, which would equate to how many times the data is looped during save. What I don't know is: 1) how to setup a loop to handle a set number of inserts 2) how to define a form field in cakePHP that only sets the number of records to create. What I've tried is the following: function massAdd() { $inserts_required = 1; while ($inserts_required <= 10) { $this->Match->create(); $this->Match->save($this->data); echo $inserts_required++; } $brackets = $this->Match->Bracket->find('list'); $this->set(compact('brackets')); } What happens is: 1) at the top of the screen, above the doc type, the string 12345678910 is displayed, this is displayed on screen 2) a total of 11 records are created, and only the last record has the values passed in the form. I don't know why 11 records as opposed to 10 are created, and why only the last records has the entered form data? As always, your help and direction is appreciated. -Paul

    Read the article

  • [EF 4 POCO] Problem with INSERT...

    - by Darmak
    Hi all, I'm so frustrated because of this problem, you have no idea... I have 2 classes: Post and Comment. I use EF 4 POCO support, I don't have foreign key columns in my .edmx model (Comment class doesn't have PostID property, but has Post property) class Comment { public Post post { get; set; } // ... } class Post { public virtual ICollection<Comment> Comments { get; set; } // ... } Can someone tell me why the code below doesn't work? I want to create a new comment for a post: Comment comm = context.CreateObject<Comment>(); Post post = context.Posts.Where(p => p.Slug == "something").SingleOrDefault(); // post != null, so don't worry, be happy // here I set all other comm properties and... comm.Post = post; context.AddObject("Comments", comm); // Exception here context.SaveChanges(); The Exception is: Cannot insert the value NULL into column 'PostID', table 'Blog.Comments'; column does not allow nulls. INSERT fails. ... this 'PostID' column is of course a foreign key to the Posts table. Any help will be appreciated!

    Read the article

  • Increment non unique field during SQL insert

    - by phill
    I'm not sure how to word this cause I am a little confused at the moment, so bare with me while I attempt to explain, I have a table with the following fields: OrderLineID, OrderID, OrderLine, and a few other unimportant ones. OrderLineID is the primary key and is always unique(which isn't a problem), OrderID is a foreign key that isn't unique(also not a problem), and OrderLine is a value that is not unique in the table, but should be unique for any OrderIDs that are the same...so if that didn't make sense, perhaps a picture OrderLineID, OrderID, OrderLine 1 1 1 2 1 2 3 1 3 4 2 1 5 2 2 For all OrderIDs there is a unique OrderLine. I am trying to create an insert statement that gets the max OrderLine value for a specific OrderId so I can increment it, but it's not working so well and I could use a little help. What I have right now is below, I build the sql statement in a program and replace OrderID # with an actual value. I am pretty sure the problem is with the nested select statement, and incrementing the result, but I can't find any examples that do this since my google skills are weak apparently.... INSERT INTO tblOrderLine (OrderID, OrderLine) VALUES (<OrderID #>, (SELECT MAX(OrderLine) FROM tblOrderLine WHERE orderID = <same OrderID #>)+1) any help would be nice.

    Read the article

  • insert Query is not executing, help me in tracking the problem

    - by Parth
    I tried the below query but it didnt executed giving error as : 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 INSERT INTO `jos_menu` SET params = 'orderby= show_noauth= show_title= link_titles= show_intro= show_section= link_section= show_category= link_category= show_author= show_create_date= show_modify_date= show_item_navigation= show_readmore= show_vote= show_icons= show_pdf_icon= show_print_icon= show_email_icon= show_hits= feed_summary= page_title= show_page_title=1 pageclass_sfx= menu_image=-1 secure=0 ', checked_out_time = '0000-00-00 00:00:00', ordering = '13', componentid = '20', published = '1', id = '152', menutype = 'accmenu', name = 'IPL', alias = 'ipl', link = 'index.php?option=com_content&view=archive', type = 'component') then i used mysql_real_escape_string() on the query containing variable which gives me the query as : INSERT INTO `jos_menu` SET params = \'orderby=\nshow_noauth=\nshow_title=\nlink_titles=\nshow_intro=\nshow_section=\nlink_section=\nshow_category=\nlink_category=\nshow_author=\nshow_create_date=\nshow_modify_date=\nshow_item_navigation=\nshow_readmore=\nshow_vote=\nshow_icons=\nshow_pdf_icon=\nshow_print_icon=\nshow_email_icon=\nshow_hits=\nfeed_summary=\npage_title=\nshow_page_title=1\npageclass_sfx=\nmenu_image=-1\nsecure=0\n\n\', checked_out_time = \'0000-00-00 00:00:00\', ordering = \'13\', componentid = \'20\', published = \'1\', id = \'152\', menutype = \'accmenu\', name = \'IPL\', alias = \'ipl\', link = \'index.php?option=com_content&view=archive\', type = \'component\') And on executing the above query I get an error as : 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'orderby=\nshow_noauth=\nshow_title=\nlink_titles=\nshow_intro=\nshow_section=\' at line 1 Can Someone guide me to track the problem in it? Thanks In Advance....

    Read the article

  • Insert array to mysql database php

    - by ganjan
    Hi. I want to add an array to my db. I have set up a function that checks if a value in the db (ex. health and money) has changed. If the value is diffrent from the original I add the new value to the $db array. Like this $db['money'] = $money_input + $money_db;. function modify_user_info($conn, $money_input, $health_input){ (...) if ($result = $conn->query($query)) { while ($user = $result->fetch_assoc()) { $money_db = $user["money"]; $health_db = $user["health"]; } $result->close(); //lag array til db med kolonnene som skal fylles ut som keys i array if ($user["money"] != $money_input){ $db['money'] = $money_input + $money_db; //0 - 20 if (!preg_match("/^[[0-9]{0,20}$/i", $db['money'])){ echo "error"; return false; } } if ($user["health"] != $health_input){ $db['health'] = $health_input + $health_db; //0 - 4 if (!preg_match("/^[[0-9]{0,4}$/i", $db['health'])){ echo "error"; return false; } if (($db['health'] < 1) or ($db['health'] > 1000)) { echo "error"; return false; } } The keys in $db represent colums in my database. Now I want to make a function that takes the keys in the array $db and insert them in the db. Something like this ? $query = "INSERT INTO `main_log` ( `id` , "; foreach(range(0, x) as $num) { $query .= array_key.", "; } $query = substr($query, 0, -3); $query .= " VALUES ('', "; foreach(range(0, x) as $num) { $query .= array_value.", "; } $query = substr($query, 0, -3); $query .= ")";

    Read the article

  • Insert Stored Procedure, Using Asp.Net WebForm to Insert new [Customer]

    - by user2953815
    Can someone please help me create a stored procedure to insert a new customer from a web form. I am having difficulty making the state a drop down list for customer to pick a state from the list and having that inserted into the database. INSERT INTO Customer ( Cust_First, Cust_Middle, Cust_Last, Cust_Phone, Cust_Alt_Phone, Cust_Email, Add_Line1, Add_Line2, Add_Bill_Line1, Add_Bill_Line2, City, State_Prov_Name, Postal_Zip_Code, Country_ID ) VALUES ( @Cust_First, @Cust_Middle, @Cust_Last, @Cust_Phone, @Cust_Alt_Phone, @Cust_Email, @Add_Line1, @Add_Line2, @Add_Bill_Line1, @Add_Bill_Line2, @City, @State_Prov_Name, @Postal_Zip_Code, @Country_ID )"> <InsertParameters> <asp:Parameter Name="Cust_First" Type="String"></asp:Parameter> <asp:Parameter Name="Cust_Middle" Type="String"></asp:Parameter> <asp:Parameter Name="Cust_Last" Type="String"></asp:Parameter> <asp:Parameter Name="Cust_Phone" Type="String"></asp:Parameter> <asp:Parameter Name="Cust_Alt_Phone" Type="String"></asp:Parameter> <asp:Parameter Name="Cust_Email" Type="String"></asp:Parameter> <asp:Parameter Name="Add_Line1" Type="String"></asp:Parameter> <asp:Parameter Name="Add_Line2" Type="String"></asp:Parameter> <asp:Parameter Name="Add_Bill_Line1" Type="String"></asp:Parameter> <asp:Parameter Name="Add_Bill_Line2" Type="String"></asp:Parameter> <asp:Parameter Name="City" Type="String"></asp:Parameter> <asp:Parameter Name="Postal_Zip_Code" Type="String"></asp:Parameter> <asp:Parameter Name="Cust_ID" Type="Int32"></asp:Parameter> <asp:Parameter Name="State_Prov_Name" Type="String"></asp:Parameter> <asp:Parameter Name="Country_Name" Type="String"></asp:Parameter> </InsertParameters>

    Read the article

  • [C#] Linq doesn't insert associated entity on insert.

    - by Tomek
    Hello! I have simple mapping: [Table(Name="Person")] public class Person { private int id; private int state_id; private EntityRef<PersonState> state = new EntityRef<PersonState>(); [Column(IsPrimaryKey = true, Storage = "id", Name="id", IsDbGenerated = true, CanBeNull = false)] public int ID { get { return id; } set { id = value; } } [Column(Storage="state_id", Name="state_id")] public int StateID { get{ return state_id;} set{ state_id = value;} } [Association( Storage = "state", ThisKey = "StateID", IsForeignKey=true)] public PersonState State { get { return state.Entity; } set { state.Entity = value; } } } [Table(Name = "PersonState")] public class PersonState { private int id; private State state; [Column(Name="id", Storage="id", IsDbGenerated=true, IsPrimaryKey=true)] public int ID { get { return id; } set { id = value; } } [Column(Name = "date", Storage = "date")] public DateTime Date { get { return date; } set { date = value; } } [Column(Name = "type", Storage = "state")] public State State { get { return state; } set { state = value; } } } I use this code to insert new person with default state: private static Person NewPerson() { Person p = new Person(); p.State = DefaultState(p); return p; } private static PersonState DefaultState() { PersonState state = new PersonState(); state.Date = DateTime.Now; state.State = State.NotNotified; state.Comment = "Default State!"; return state; } Leater in code: db.Persons.InsertOnSubmit(NewPerson()); db.SubmitChanges(); In database(sqlite) I have all new persons, but state_id of all persons is set to 0, and PersonState table is empty. Why Linq did not insert any State object to database?

    Read the article

  • Trying to Insert Text to Access Database with ExecuteNonQueryin VB

    - by user3673701
    I'm working on this feature were i save text from a textbox on my form to a access database file. With the click on my "store" button I want to save the text in the corresponding textbox fields to the fields in my access database for searching and retrieving purposes. Im doing this in VB The problem I run into is the INSERT TO error with my "store" button Any help or insight as to why im getting error would be greatly appreciated. here is my code: Dim con As System.Data.OleDb.OleDbConnection Dim cmd As System.Data.OleDb.OleDbCommand Dim dr As System.Data.OleDb.OleDbDataReader Dim sqlStr As String Private Sub btnStore_Click(sender As Object, e As EventArgs) Handles btnStore.Click con = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Eric\Documents\SPC1.2.accdb") con.Open() MsgBox("Initialized") sqlStr = "INSERT INTO Master FADV Calll info (First Name, Last Name, Phone Number, Email, User Id) values (" & txtFirstName.Text & " ' ,'" & txtLastName.Text & "','" & txtPhone.Text & "', '" & txtEmail.Text & "', '" & txtUserID.Text & "', '" & txtOtherOptionTxt.Text & "','" & txtCallDetail.Text & "');" cmd = New OleDb.OleDbCommand(sqlStr, con) cmd.ExecuteNonQuery() <------- **IM RECIVING THE ERROR HERE** MsgBox("Stored") ''pass ther parameter as sq; query, con " connection Obj)" con.Close()'

    Read the article

  • Cakephp Insert Ignore Feature?

    - by SeanDowney
    Is there a way to do an "insert ignore" in cake without using a model-query function? $this->Model->save(array( 'id' => NULL, 'guid' => $guid, 'name' => $name, )); Generates error: Warning (512): SQL Error: 1062: Duplicate entry 'GUID.....' for key 'unique_guid' [CORE/cake/libs/model/datasources/dbo_source.php, line 524] It would be great to be able to set some flag or option that says "don't care"

    Read the article

  • Access Insert Query

    - by tecno
    Hi, I am using C# to write/read to an Access 2007 Database. The table is ID - AutoNumber [pkey] Fname - Text Lname - Text Address - Text The query string I Use is "Insert into TblMain (Fname,Lname,Address) Values ('"+fname+"','"+lname+"','"+adrs+"')" No errors are returned, the query executes but data is not added to the db. Inserting to table using which does not have an autonumber data column works perfectly. What am I missing?

    Read the article

  • How to insert date in sqlite through java.

    - by dimitar
    Hello guys, I want to make a database that will hold a date in it(SQLite). Now first to ask is what is the right syntax to declare a date column. The second i want to know is how to insert date in it after that. And the third thing i want to know is how to select dates between, for example to select all rows which contain date between 01/05/2010 and 05/06/2010. Thank you

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >