Member Avatar

I have a transaction, there is a method calling in the tran. which makes insertion into a table, after that when i select the row that i have inserted, i find no result how can i solve this problem without changing this structure or what else can i do? Thanks in advance using (TransactionScope scope01 = new TransactionScope(option01, span01)) { InsertIntoTable(); // inserting a row into Foo table , insert into...executenonquery string smcd = "select * from Foo Where XCol=@XParm"; ExecuteQuery(scmd); // This Returns no result scope01.Complete(); }

Member Avatar
0
24
Member Avatar

Hello, Despite much searching, I've hit a wall with trying to get a varying number of records inserted into a database. Here's what I'm trying to do..... I'm building an online sign on site for races at a sailing club. For the sign on page, I want to make it possible for racers to sign on for either one or all the races happening on a day. Here's the form..... [CODE] <form action="" method="post" name="form1" id="form1"> <table align="center"> <tr valign="baseline"> <td nowrap="nowrap" align="right">Helm:</td> <td><select name="helm"> <option value="">Please Select....</option> <?php do { ?> <option value="<?php echo $row_sailors['name']?>"><?php echo $row_sailors['name']?></option> <?php } …

Member Avatar
0
8
Member Avatar

i have created a html form page(1) and php page(2) to insert records into a database from the html form, when i insert the records from the html form and press the submit button the records don't get into the database but a page open with the php code i have wrote,and if i opened the php page or refresh it an empty records get added to my database,here is my html and php code: html code:[CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="author" content="asdasdas" /> <title>informations</title> </head> …

Member Avatar
0
7
Member Avatar

[code = c][/code] I am trying to write a program that takes a 10 digit phone number and inserts hyphens between the 3rd and 4th digit and the 6th and 7th digit eg. Enter phone number: 5553459875 Your number is 555-345-9876 I've decided that reading the number as an integer won't work and tried reading each as a char but then it still doesn't print how I want it to Any help would be appreciated Thanks

Member Avatar
0
4
Member Avatar

I am trying to have a search bar where user will input a string ($var) which after i will search that sting in the field named: "itemname". i will search all the different tables in the database and create a new temporary database named: searchtable. seachtable should contain all the data where itemname was $var. Then i want to select the data from the new database and display it. Sounds simple right? wrong! :) i am having issues. Please help here is my query statement: [CODE] $query = "Select * INTO searchtable from art WHERE itemname like \"%$trimmed%\" UNION ALL …

Member Avatar
0
9
Member Avatar

[code] Imports System.Data.SqlClient Imports System.Data.SqlClient.SqlDataReader Imports System.Data.SqlClient.SqlConnection Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Inherits System.Windows.Forms.Form Dim myConnection As New SqlConnection Dim myCommand As New SqlCommand Dim ds As New DataSet Dim cmdtext As Integer Dim action As String Dim view As DataView Dim dr As SqlDataReader Dim cmdtext As String Dim cmd As New SqlCommand myConnection = New SqlConnection("Data Source=RUSHIKES-1A6789\SQLEXPRESS;Initial Catalog=AutoParts;Integrated Security=True") Try myConnection.Open() myCommand.Connection = myConnection myCommand.CommandText = "Insert Into customer(c_id,c_name,c_add,c_phno1,c_phno2,c_phno3,c_email) values ("& txtb1.text",'"& txtb2.text"','"& txtb3.text"',"& txtb4.text","& txtb5.text","& txtb6.text",'"& txtb7.text"')" myCommand.ExecuteNonQuery() Catch ex As Exception MessageBox.Show("Error while inserting record on table..." & ex.Message, …

Member Avatar
0
4
Member Avatar

I'm in the middle of a project development, and I'm frustrated with this problem. Im running XAMPP under Ubuntu 10.04 (Lucid Lynx) mySQL version : Ver 14.14 Distribution 5.1.41 The problem is that, mySQL is accepting null values even if the field is declared with the NOT NULL constraint. Example: [CODE] CREATE TABLE `STUDENT` ( name VARCHAR(255) NOT NULL, age INT ); INSERT INTO `STUDENT` (age) VALUES (19); [/CODE] In the query above. mySQL still accepts the data, even if I do not indicate any value for the name column. Is there something wrong? Do I need to configure something …

Member Avatar
0
5

The End.