Struggling With Inserting Data

Oct 31, 2007

Hello all

I am trying to insert data from the Report table to the Revised_Maintable
my problem is that I get an error message every time. I dont know what to do



INSERT INTO dbo.Revised_MainTable([IR Number], Date, [I/RDocument], [Violation Type] )
SELECT [Date], [I/RDocument], TypeOfIncident, [Incident Report No] FROM dbo.Report
WHERE NOT EXISTS(SELECT * FROM dbo.Report WHERE [Incident Report No] = [IR Number])



This is the Report Table [dbo].[Report](
[Incident Report No] [nvarchar](100) NOT NULL,
[Date] [datetime] NULL,
[Time] [datetime] NULL,
[Investigators Name] [nvarchar](100) NULL,
[Reported by] [nvarchar](100) NULL,
[Law Enforcement Agency] [nvarchar](100) NULL,
[Name of Officer] [nvarchar](100) NULL,
[Evidence Seized] [nvarchar](100) NULL,
[Associated Reports] [nvarchar](50) NULL,
[Corrective Action] [nvarchar](50) NULL CONSTRAINT [DF_Report_Corrective Action] DEFAULT (N'YES'),
[Comments] [ntext] NULL,
[I/RDocument] [ntext] NULL CONSTRAINT [DF_Report_I/RDocument] DEFAULT (N'SCANNED REPORT'),
[TypeOfIncident] [nvarchar](300) NULL,
[Exclusion] [nvarchar](50) NULL CONSTRAINT [DF_Report_Exclusion] DEFAULT (N'NO'),
[86_D] [nvarchar](50) NULL CONSTRAINT [DF_Report_86_D] DEFAULT (N'NO'),
[Loss] [money] NULL CONSTRAINT [DF_Report_Loss] DEFAULT (0.0000),
[LossType] [nvarchar](50) NULL,
[Area] [nvarchar](75) NULL,
[Action/Incident] [nvarchar](50) NULL,
[Security/GC] [nvarchar](50) NULL CONSTRAINT [DF_Report_Security/GC] DEFAULT (N'GC'),
CONSTRAINT [PK_Report] PRIMARY KEY CLUSTERED
(




and the Revised_MainTable

[dbo].[Revised_MainTable](
[I/RDocument] [ntext] NULL CONSTRAINT [DF_Revised_MainTable_I/RDocument] DEFAULT (N'Scanned Report'),
[IR Number] [nvarchar](100) NOT NULL,
[Date] [datetime] NULL,
[Inspector] [nvarchar](50) NULL,
[Area] [nvarchar](50) NULL,
[Violation] [nvarchar](50) NULL,
[Violation Type] [nvarchar](100) NULL,
[Loss] [money] NULL CONSTRAINT [DF_Revised_MainTable_Loss] DEFAULT (0.0000),
[Loss Type] [nvarchar](50) NULL,
[Employee] [ntext] NULL,
[Guest] [ntext] NULL,
[Action] [nvarchar](50) NULL,
[Action Type] [nvarchar](50) NULL,
[Notes] [ntext] NULL,
[Security/GC] [nvarchar](50) NULL CONSTRAINT [DF_Revised_MainTable_Security/GC] DEFAULT (N'GC'),
CONSTRAINT [PK_Revised_MainTable] PRIMARY KEY CLUSTERED
(

View 14 Replies


ADVERTISEMENT

Struggling To Import Data From Flat File To Sql Db

Apr 1, 2008

Hello all,

We have been trying now for the past 2 days to import data from a flat file to sql server database but with no luck.

The real issue here is that one of the field names has a very long value.

As a result, the import fails because it is unable to truncate the value.

We really don't want the value truncated but we have not been able to import the entire data file.

We have used nvarchar(max) but it doesn't work.

Can someone please let me know if you have encountered this type of issue and how was it resolved?

Thanks in advance.

View 12 Replies View Related

Struggling With Dts From .NET

Jan 23, 2007

Hi everyone,

We've got running an vb .net service which throws on-demand .DTSX. Now a new feature has been added: it must be able to launch dts 2000/7.0 too. No problem with that. It works fine using the same thread.

Issue comes when we were accostumed to cancel any DTSX execution for sake IDTSEvents interface and OnQueryCancel event. We want to the same but for the old ETL.

My wonder is how do the same but related with DTS???

I attached you this snippet of code which is responsible for launching a dts:

Private WithEvents paquete As DTS.Package2

paquete = New DTS.Package2

paquete.LoadFromSQLServer("SRVDESA1", , , DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedConnection, , , , "pruebaenric")

paquete.Execute()

Private Sub paquete_OnQueryCancel(

stuff (NEVER ENTRY HERE) ???

Private Sub paquete_OnProgress(ByVal EventSource As String, _

stuff (NEVER ENTRY HERE) ???

Private Sub paquete_OnError(ByVal EventSource As String, _

stuff (NEVER ENTRY HERE) ???

Let me know what's happening? Is something related with managed and unmanaged code? Any COM feature or something like that??

Or is only that I've got to define a private class how I did with SSIS and to use one specific interface??

Primary platform is Framework 2.0

Thanks in advance for your time and information provided,

Enric

View 1 Replies View Related

Struggling With Deployment Of SSE

Jul 25, 2006

Have my first .NET app deployed to remote host and configured successfully, except for one thing: can't figure out how to export my SSE tables to the SQL server database on the remote server.  I tried SQL Server Management Studio Express ... with that, I can access the remote database, but can't access the local database file I produced with VSWDE.  What is the appropriate tool to use to export tables from a local SSE database file to a remote SQL Server 2005?

View 3 Replies View Related

Struggling With Subquery

Jan 17, 2008

I am trying to get the SUM of the values from a subquery and I just can't wrap my head around the subquery thing! Can anyone please point out the error of my ways?

I have tried 2 slightly different ones:

Select project.[id] "ID", companyname.[name]"Company", project.projectname "ProjName", project.startdate "StartDate"
,SUM(BudgetTotal + AddTotal + StockTotal) "TotalBudget"
(SELECT ISNULL(SUM(budget.budget),0) AS BudgetTotal
FROM budget WHERE budget.projectID = project.[id])
(SELECT ISNULL(SUM(budget_additionals.budget),0) AS AddTotal
FROM budget_additionals WHERE budget_additionals.projectID = project.[id])
(SELECT ISNULL(SUM(project_stock.saleprice),0) AS StockTotal
FROM project_stock WHERE project_stock.projectID = project.[id])

From project, companyname

WHERE project.companyid = companyname.[id]
AND (project.startdate >= '2006-11-01')
AND (project.startdate <= '2007-10-31')
AND project.jobtypeid = 1
ORDER BY "Company"
This gives me an "Server: Msg 156, Level 15, State 1, Line 10
Incorrect syntax near the keyword 'From'" error...

The next one i tried looked like this:
Select project.[id] "ID"
,companyname.[name]"Company"
,project.projectname "ProjName"
,project.startdate "StartDate"
,SUM((SELECT ISNULL(SUM(budget.budget),0)FROM budget WHERE budget.projectID = project.[id]) +
(SELECT ISNULL(SUM(budget_additionals.budget),0)FROM budget_additionals WHERE budget_additionals.projectID = project.[id]) +
(SELECT ISNULL(SUM(project_stock.saleprice),0)FROM project_stock WHERE project_stock.projectID = project.[id])
) "Budget"

From project, companyname

WHERE project.companyid = companyname.[id]
AND (project.startdate >= '2006-11-01')
AND (project.startdate <= '2007-10-31')
AND project.jobtypeid = 1
ORDER BY "Company"
And I get "Cannot perform an aggregate function on an expression containing an aggregate or a subquery"

Cheers in advance :-)
Glyn

View 2 Replies View Related

I Am Struggling Through Views

Jul 20, 2005

Hi there, it's me again. I am having trouble with a view again. I amtrying to do a calculation, but there are some checks that need to betaken into consideration. Maybe a view is not the right way to dealwith this. I don't know.This is the beginning of my query.SELECT coalesce(f.filenumber, i.filenumber) as filenumber,i.InvoiceNumber, i.InvoiceValue, il.lineid, MPF = .21 * (il.UnitCost *il.UnitQty + il.AddMMV - il.MinusMMV - il.MinusNDC + il.ErrorAmt)FROM tblFILE f inner join tblINVOICE i on (f.filenumber =i.filenumber) left outer join tblINVOICE_LINE il on (i.Invoiceid =il.invoiceid)This works just as it should. However, if the Sum of all MPFs perfile total less than 25.00 or more than 485.00 then each MPF has to berecalculated as:Percentage of TotalEnteredValue = (InvoiceValue / (il.UnitCost *il.UnitQty + il.AddMMV - il.MinusMMV - il.MinusNDC + il.ErrorAmt)Percentage of TotalEnteredValue * 25.00 = MPF orPercentage of TotalEnteredValue * 485.00 = MPFCan you do something like this in a View? Or do I need to dosomething like a trigger?I greatly appreciate all help. I am struggling to get a foothold onviews. I am getting there.

View 4 Replies View Related

Struggling Importing .sql Table

Apr 2, 2007

I have two tables I need to create in msSQL and I have the .sql files with the information in them, is it possible to insert them through enterprise manager?
Or another way? Or are they meant for mySQL?

cheers

View 3 Replies View Related

SQL Transactional Replication Distribution Server Struggling

Jun 5, 2006

We are attempting to rollout a name and address system to 10,000 users who will use an application connected to an MSDE database.

We are using transactional replication to distribute data updates to them. Clients are connecting via the On-Idle feature of Synchronization Manager to grab transactions.

Server spec:
Network card: 1GB
Processors: 2* Xeon 3.2Ghz
Server spec: DL380 2Gb memory
Concurrent connections set to: 600
Disc: RAID 10 with 6400 controller

We are not using hyper-threading.

So far we have rolled the system out to 3500 subscribers, 500 per day.

Each day a subsciber will receive at least 400 transactions and 5000 commands.

Latency is 6 seconds, delivery rate 180 commands per second at less busy times.
Latency is 14 seconds, delivery rate 127 commands a second at busy times.

I have seen it get as slow as 0.04 commands a seconds at busy times.

The server becomes incredibly slow when there are more than 50 concurrent connections.

We are seeing 100 CPU for most of the day as clients connect to the distributor at various times. Lunchtime is particularly busy when people go to lunch, leaving their machines idle. We see lots of "time-outs" and "unable to connect to distributor" messages on the replication monitor during peak times.

What can we do to improve the performance of the distribution server?

Are we being over-ambitious by selection SQL Replication for this scenario?

Thank you for any help!

Best wishes

Julian

View 1 Replies View Related

Still Struggling With Flat File Into Multiple Tables

Jan 23, 2007

So here's the issue

16 flat files all fixed width. Some over 350 columns.

Open flat file 1

extract id and go see if its in table 1, if true update table 1 with first 30 columns

otherwise insert into table 1 first 30 columns.

goto table 2, lookup id, insert/update next 30 columns...etc..etc..for 10 different tables

So I've got my flat file source, I do a derived column to convert the dates, i've got a lookup for table 1, then 2 ole db commands, 1 for update if lookup successful, 1 for insert if lookup fails.

How can I pass the id as a param into the update command so it updates where x = 'x'

also I need a pointer on doing the next lookup, eg table 2, would I do this as some sort of loop?.

If you can help great, but, please don't just reply with "I'd use this object"...then no explanation of how

v.v.frustrated newbie to SSIS

View 8 Replies View Related

Inserting Data Into Two Tables (Getting ID From Table 1 And Inserting Into Table 2)

Oct 10, 2007

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!!

View 3 Replies View Related

SQL Server 2012 :: Get Empty Data Set For Inserting Data?

Nov 11, 2014

I have 2 tables in my database.

one is Race table and 2nd one is Age Range.

I want to write a query where I can see all races and age range as column.

TblRace

ID, RaceName

TblAgeRange

ID,AgeRange.

There is no connection between this two table. I need to display result like below.

Race 17-20 21-30 31-40

A

B

I

W

How do i get this kind of empty data set so that I can fill it out in front end or any better solution. The age range will be displayed as many row as they have. It's not static. Above is just an example.

View 1 Replies View Related

Inserting The Data Into Text Data Type

Jan 22, 2001

Hi everybody,

In our datbase we have a table with text data type.Help me if anybody knows how to insert text data into text data type of sql server.

i am able to modify and retrive but i am not able to insert text. please if u have idea, please give me reply asap.

Thanks,
Giri

View 1 Replies View Related

Adding New Data Fiels And Inserting Data

Sep 17, 2004

I have some website work lined up and it involves some simple modifications to a MS SQL 2000 server. What I'll need to do is add some new data fields and insert some data.

I have some experience with databases - MS Access and MySQL, but I have never used or seen MS SQL 2000. My question is, is this a relatively simple thing to do for someone who hasn't used it before? I can do these things quite simply in Access or MySQL, so is MS SQL 2000 going to be any different?

Also, does anyone know of any free tutorials online that would help me out?

Thanks

View 1 Replies View Related

Inserting Data To Text File From Database And Inserting Data Back To Database From Text File

Aug 7, 2007

Hello friends....
I am looking for 2 things(using c#.net or vb.net and sql svr 2000)
1.convert data from sql server 2000 database (say customers table from northwinds database) to a text file(separated by commas or just plain space)
2.Insert the data from text file back to database.
Can someone pls give me the detailed code to achieve this....really need this on urgent basis.......Thank You.

View 10 Replies View Related

Help On Inserting Data To DB

Sep 11, 2006

Hi,I m using Microsoft Visual Studio 2005 and SQL server 2000. I have 2 textboxes and a button, what i wanna do is, when i hit the button, the values in textboxes should be inserted into DB. Would you please help me? Thanks in advance.

View 1 Replies View Related

Inserting Data Into DB

May 5, 2007

Hi friends,I have one text box on my form.i need to insert the data from tat text box to DB without clicking on any button.Now i have written the code under text changed event of that text box.So it is inserting whenever i click on that form.Besides this i need to insert data when i close tat window.But it is not inserting when i close tat window.Plse help me.Thanks in advance
With RegardsLijo Rajan

View 1 Replies View Related

Inserting Data

Jun 6, 2007

I have created a form with several fields etc and validation.

After pressing the submit button i have a

if Page.IsValid then .....etc
But in this then bit I want to do a

INSERT the form details to the db.

I have done inserts etc via gridView etc but I just need a form that lets someone enter info and submit etc, so do not now where to or how to place this code to connect then insert etc

thanks

View 3 Replies View Related

Inserting Data To SQL

Dec 6, 2005

Hi all,
 
I'm having a problem saving the information from my web form into my sql database when I clicked on the 'Submit' button.
This is the error message
 Server Error in '/Helpdesk' Application.




ExecuteNonQuery: Connection property has not been initialized.
I've attached my code below. Please advise me on what is wrong... How should I initialise the ExecuteNonQuery.
========= start code ====================
Dim MySQL As String
MySQL = ""
Dim MyConn As SqlConnection = New SqlConnection()
Dim MyCmd As SqlCommand = New SqlCommand()
MyConn.ConnectionString = "Server=ESAWEB2;Database=Helpdesk;Trusted_Connection=True;"
MySQL = "INSERT INTO TBL_TROUBLE_TICKET (Priority) values (' ddlpriority ')"

MyConn.Open()

MyCmd.ExecuteNonQuery()
MsgBox("Record Inserted")
=======end code ===============

View 1 Replies View Related

Need Help Inserting Data!!

Mar 27, 2006

I am not looking for free code but this is driving me out of my mind. I'm a pretty proficient PHP programmer and have been dealing with a form that I was made to program in ASP.Net due to my employer's preferences. I can't attach the code for the form so I have cut and pasted it below. I am needing to know whow do I code this so that the data will go into a MS SQL 2005 database? I already have some coding in it but I don't know if it's correct and any help in getting this fixed would be great as it is slowly driving me up the wall. Thanks!
 
  <%@ Page Language="VB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

Protected Sub Button_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim conebackups As SqlConnection
Dim strInsert As String
Dim cmdInsert As SqlCommand

conebackups = New SqlConnection("Server=localhost;UID=sa;pwd=kitten33;database=ebackups")
strInsert = "INSERT cust_info ( cust_name, cust_contact, cust_phone, cust_analyst, install_date, cust_username, cust_password, account_request_type, quickbooks_check, peachtree_check, mssba_check, goldmine_check, act_check, mail_info, db_info, mapped_info, mobile_data, mail_option, db_option, mapped_option, mobile_option, backupexec_option ) Values ( 'cust_name, 'cust_contact', 'cust_phone', 'cust_analyst', 'install_date', 'cust_username', 'cust_password', 'account_request_type', 'quickbooks_check', 'peachtree_check', 'mssba_check', 'goldmine_check', 'act_check', 'mail_info', 'db_info', 'mapped_info', 'mobile_data', 'mail_option', 'db_option', 'mapped_option', 'mobile_option', 'backupexec_option' )"
cmdInsert = New SqlCommand(strInsert, conebackups)
conebackups.Open()
cmdInsert.ExecuteNonQuery()
conebackups.Close()
End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Weston Backup Questionnaire</title>
<script language="javascript" type="text/javascript">
</script>
</head>
<body>
<form id="westonquest" runat="server">
<div>
<div style="border-left-color: black; border-bottom-color: black; border-top-color: black;
text-align: center; border-right-color: black" title="Weston Backup Questionnaire">
<table>
<tr>
<td colspan="3" style="width: 540px; height: 30px; text-align: center">
<span style="font-size: 14pt; font-family: Verdana">Weston Online Backup Questionnaire</span></td>
</tr>
<tr>
<td colspan="3" style="width: 540px; height: 10px; text-align: left">
<hr />
<span style="font-size: 8pt; font-family: Verdana">Please fill out the following information
as accurately as possible. Any incorrect information may affect the customers online
backup in a serious manner. All of the following fields require an answer before
you can submit the form.<br />
</span></td>
</tr>
<tr>
<td colspan="3" style="width: 540px; height: 21px">
<br />
<span style="font-size: 14pt; font-family: Verdana">Customer and Analyst Information</span></td>
</tr>
<tr>
<td colspan="3" style="width: 540px; height: 21px; text-align: left">
<hr />
<span style="font-size: 8pt; font-family: Verdana">Customer Name:<br />
</span>
<asp:DropDownList ID="cust_name" runat="server" Font-Names="Verdana" Font-Size="X-Small"
Width="232px" DataSourceID="SqlDataSource1" DataTextField="cust_name" DataValueField="cust_name">
<asp:ListItem>Select Customer Name.....</asp:ListItem>
<asp:ListItem Value="WestonANC">Weston - ANC</asp:ListItem>
<asp:ListItem Value="WestonBND">Weston - BND</asp:ListItem>
</asp:DropDownList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ebackupsConnectionString %>"
SelectCommand="SELECT [cust_name] FROM [backup_info]"></asp:SqlDataSource>
<span style="font-size: 8pt; font-family: Verdana">
<br />
<br />
Customer Contact:                  
                  Customer Phone Number:<br />
<asp:TextBox ID="cust_contact" runat="server" Font-Names="Verdana" Font-Size="X-Small"
Width="190px"></asp:TextBox>
              <asp:TextBox ID="cust_phone"
runat="server" Font-Names="Verdana" Font-Size="X-Small" Width="146px"></asp:TextBox><br />
<br />
Analyst:                      
                       
      Today's Date: (mm/dd/yyy format)<br />
<asp:DropDownList ID="cust_analyst" runat="server" Font-Names="Verdana" Font-Size="X-Small"
Width="162px">
<asp:ListItem>Select Analyst.....</asp:ListItem>
<asp:ListItem>Brock McFarlane</asp:ListItem>
<asp:ListItem>Cameron Farrally</asp:ListItem>
<asp:ListItem>Eric Spinney</asp:ListItem>
<asp:ListItem>Greg Freeman</asp:ListItem>
<asp:ListItem>Kevin Mark</asp:ListItem>
<asp:ListItem>Mark Anderson</asp:ListItem>
<asp:ListItem>Mike Murphy</asp:ListItem>
<asp:ListItem>Tim Elder</asp:ListItem>
</asp:DropDownList>
                      
<asp:TextBox ID="install_date" runat="server" Font-Names="Verdana" Font-Size="X-Small"></asp:TextBox><br />
<br />
Customer E-Backup Username:                
  Customer E-Backup Password:<br />
<asp:TextBox ID="cust_username" runat="server" Font-Names="Verdana" Font-Size="X-Small"
Width="150px"></asp:TextBox>
                         <asp:TextBox ID="cust_password" runat="server" Font-Names="Verdana" Font-Size="X-Small"
Width="150px" TextMode="Password"></asp:TextBox><br />
<br />
<asp:RadioButtonList ID="account_request_type" runat="server" Font-Names="Verdana" Font-Size="X-Small"
RepeatDirection="Horizontal" Width="430px">
<asp:ListItem Value="New">New Account</asp:ListItem>
<asp:ListItem Value="Change">Account Change</asp:ListItem>
<asp:ListItem Value="Delete">Account Deletion</asp:ListItem>
</asp:RadioButtonList></span><br />
</td>
</tr>
<tr>
<td colspan="3" style="width: 540px; height: 21px; text-align: center;">
<span style="font-size: 14pt; font-family: Verdana">Financial / CRM Programs</span></td>
</tr>
<tr>
<td colspan="3" style="width: 540px; height: 21px; text-align: left">
<hr />
<span style="font-size: 8pt; font-family: Verdana">Does the customer use any of the
following financial / CRM products?<br />
<br />
Quickbooks<asp:CheckBox ID="quickbooks_check" runat="server" />
         Peachtree Accounting<asp:CheckBox ID="peachtree_check"
runat="server" />
         MS Small Business Acct<asp:CheckBox ID="mssba_check"
runat="server" />
        
<br />
Sage Goldmine<asp:CheckBox ID="goldmine_check" runat="server" />
         Sage ACT!<asp:CheckBox ID="act_check" runat="server" /><br />
<br />
<br />
</span></td>
</tr>
<tr>
<td colspan="3" style="width: 540px; height: 21px; text-align: center">
<span style="font-size: 14pt; font-family: Verdana">BackupExec / NTBackup</span></td>
</tr>
<tr>
<td colspan="3" style="width: 540px; height: 21px; text-align: left">
<hr />
<span style="font-size: 8pt; font-family: Verdana">Does the customer use BackupExec,
NTBackup or any other backup software? </span><span style="color: #ff0066"><span
style="font-size: 8pt; font-family: Verdana">(Important!)<br />
<br />
</span>
<asp:RadioButtonList ID="backupexec_option" runat="server" Font-Names="Verdana" Font-Size="X-Small"
ForeColor="Black" RepeatDirection="Horizontal" Width="127px">
<asp:ListItem Value="Yes">Yes</asp:ListItem>
<asp:ListItem Value="No">No</asp:ListItem>
</asp:RadioButtonList></span><span style="font-size: 8pt; font-family: Verdana">If "Yes"
which program do they use for backups?  <asp:TextBox ID="backup_program" runat="server"
Font-Names="Verdana" Font-Size="X-Small" Width="200px"></asp:TextBox><br />
<br />
<br />
</span>
</td>
</tr>
<tr>
<td colspan="3" style="width: 540px; height: 21px; text-align: center">
<span style="font-size: 14pt; font-family: Verdana">Mail Server Backup</span></td>
</tr>
<tr>
<td colspan="3" style="width: 540px; height: 21px; text-align: left">
<hr />
<span style="font-size: 8pt; font-family: Verdana">Does the customer want to backup
their E-Mail system?<br />
<br />
</span>
<asp:RadioButtonList ID="mail_option" runat="server" Font-Names="Verdana" Font-Size="X-Small"
RepeatDirection="Horizontal" Width="127px">
<asp:ListItem Value="Yes">Yes</asp:ListItem>
<asp:ListItem Value="No">No</asp:ListItem>
</asp:RadioButtonList><span style="font-size: 8pt; font-family: Verdana">If "Yes" what
e-mail server software does the customer use?
<asp:TextBox ID="mail_info" runat="server" Font-Italic="False" Font-Names="Verdana"
Font-Overline="False" Font-Size="X-Small" Width="171px"></asp:TextBox><br />
<br />
<br />
</span>
</td>
</tr>
<tr>
<td colspan="3" style="width: 540px; height: 21px; text-align: center">
<span style="font-size: 16pt; font-family: Verdana">Database Backup</span></td>
</tr>
<tr>
<td colspan="3" style="width: 540px; height: 30px; text-align: left">
<hr />
<span style="font-size: 8pt; font-family: Verdana">Does the customer have a SQL, Access
or other RDMS that they wish to have backed up?<br />
<br />
</span>
<asp:RadioButtonList ID="db_option" runat="server" Font-Names="Verdana" Font-Size="X-Small"
RepeatDirection="Horizontal" Width="128px">
<asp:ListItem Value="Yes">Yes</asp:ListItem>
<asp:ListItem Value="No">No</asp:ListItem>
</asp:RadioButtonList><span style="font-size: 8pt; font-family: Verdana">If "Yes" please
list the databases the customers needs to have backed up.<br />
<asp:TextBox ID="db_info" runat="server" Height="102px" Width="321px"></asp:TextBox><br />
<br />
<br />
</span>
</td>
</tr>
<tr>
<td colspan="3" style="width: 540px; height: 21px; text-align: center">
<span style="font-size: 16pt; font-family: Verdana">Network Drives</span></td>
</tr>
<tr>
<td colspan="3" style="width: 540px; height: 21px; text-align: left">
<hr />
<span style="font-size: 8pt"><span style="font-family: Verdana">Does the customer want
any shared or mapped drives backed up? </span><span style="color: #ff0066"><span
style="font-family: Verdana">(Important!)</span><span style="color: #000000"><span
style="font-family: Verdana">
<br />
<br />
</span>
<asp:RadioButtonList ID="mapped_option" runat="server" Font-Names="Verdana" Font-Size="X-Small"
RepeatDirection="Horizontal" Width="126px">
<asp:ListItem Value="Yes">Yes</asp:ListItem>
<asp:ListItem Value="No">No</asp:ListItem>
</asp:RadioButtonList></span></span></span><span style="font-size: 8pt; font-family: Verdana">If
"Yes" please list the mapped or network drive the customer wishes to backup.<br />
<asp:TextBox ID="mapped_info" runat="server" Height="101px" Width="321px"></asp:TextBox><br />
<br />
</span>
</td>
</tr>
<tr style="color: #000000">
<td colspan="3" style="width: 540px; height: 21px; text-align: center">
<span style="font-size: 16pt; font-family: Verdana">Mobile Users</span></td>
</tr>
<tr style="color: #000000">
<td colspan="3" style="width: 540px; height: 21px; text-align: left">
<hr />
<span style="font-size: 8pt; font-family: Verdana">Does the customer have mobile users
that they wish to have data backed up for?<br />
<br />
</span>
<asp:RadioButtonList ID="RadioButtonList1" runat="server" Font-Names="Verdana" Font-Size="X-Small"
RepeatDirection="Horizontal" Width="121px">
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem>
</asp:RadioButtonList><span style="font-size: 8pt; font-family: Verdana">If "Yes" please
enter the username and machine name for mobile user as well as when they will be
in the office for remote install of software.<br />
<asp:TextBox ID="TextBox1" runat="server" Height="101px" Width="321px"></asp:TextBox><br />
<br />
</span>
</td>
</tr>
<tr style="color: #000000">
<td colspan="3" style="width: 540px; height: 21px; text-align: center">
<asp:Button ID="Button" runat="server" Text="Submit Form For Processing" /></td>
</tr>
</table>
</div>

</div>
</form>
</body>
</html> 

View 5 Replies View Related

Inserting Data PK/FK

Feb 18, 2006

I'm trying to insert a record into a master table, but b/c of the foreign key relationship, I know that I need to first insert a record into the child table so I don't get a foreign key error. The problem is that the record that I'm inserting doesn't have any columns that match up (similar)to the child table, and only a few that match up to the master table.

View 3 Replies View Related

Inserting Data

Mar 2, 2007

I want to insert data into a table Period without overwriting old data

SELECT Period1Start,Period1End, 1 as PeriodType, SuperAreaID,Period1Price INTO Period
FROM EUBoatsPreferences2 where SuperAreaID = 71

go

SELECT Period1Start,Period1End, 2 as PeriodType, SuperAreaID,Period1Price INTO Period
FROM EUBoatsPreferences2 where SuperAreaID = 72

SQL 2005 IS SAYING
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Period' in the database.

Which I know, I just want to append the data, pls help

If it is that easy, everybody will be doing it

View 2 Replies View Related

Inserting Xml Data

Jul 23, 2005

Hi,Is there any way to insert the output of xml_auto into a tablefor eg:select * from categories for xml autoi need the output of the abouve query to be inserted into another tablethe destination table has one column,

View 2 Replies View Related

Need Help Inserting Data In A Table That Already Has Data

Jan 4, 2006

I need to create a stored procedure that will insert data with some already exsisting data in a table. The data is in a spreadsheet, my issue is that I dont want to violate the primary key rules.

can anyone help please

CREATE PROCEDURE InsertTerms
AS
INSERT INTO [GamingCommissiondb].[dbo].[TERMINATION] ( [TM #],
[FirstName],
[LastName],
[SocialSecurityNumber],
[DateHired],
[Status],
[Title],
[DepartmentName],
[Pictures])

SELECT a.TM#, a.FirstName, a.LASTNAME, a.SSN#, a.HIREDATE, a.STATUS, a.JOBTITLE, a.DEPT#, a.PICS
FROM EmployeeGamingLicense AS a
WHERE a.STATUS = 'TERMINATED'
IF @@Error <> '0'
RETURN


GO

View 13 Replies View Related

Inserting Unicode Data

Feb 20, 2007

Hi.
We have a sql server db that we need to store Unicode text in. The fields are of the type nvarchar, ntext and nchar. Our solution uses both Oracle and SqlServer as a backing database. In Oracle there is a connection string switch "Unicode=True" that fixes the problem. Is there something similar in SqlServer? Since the db layer is generic we'ed like to avoid using a N' prefix on text strings in query statements.

View 2 Replies View Related

Inserting Data Into Ms SQL Server

Oct 8, 2007

I am trying to transition from Access to MS SQL. I downloaded and installed MS SQL 2005 Express and the Server Management Studio Express. Keep in mind that I am a total newbie to this database since I've always used Access. My question is, how do I insert data manually into my tables? I figured out how to set up a table and query a table, but is there somewhere I can just plug in data? In Access, I just open the table and type it in. Also, how do you set an auto increment numeric field in a table?- Jason

View 4 Replies View Related

Regarding Inserting Data From GUI To Database

Feb 28, 2008

Hi iam working with the form which has fields like AuditName,Industry Name,Company Name,Plant Name,Group Name,AuditStartedOn,Auditperiod upto,CreatedOn,createdby
I have dropdownlists for Industry Name,Company Name,Plant Name,Group Name.Data will be filled into Industry Name,Group Name when pageloads from the database and later depending on industryname company name and depending on company name plant name ddl's wiil be filled.
Later to insert this into the Audit table i had given the Stored procedure as :
create procedure CreateAudit
(
@AuditName nvarchar(50),
@IndustryName nvarchar(50),
@IndustryID int output,
@CompanyName nvarchar(50),
@CompanyID int output,
@PlantName nvarchar(50),
@PlantID int output,
@GroupName nvarchar(50),
@GroupID int output,
@AuditStartedOn datetime,
@AuditScheduledto datetime,
@CreatedOn datetime,
@CreatedBy int
)
as
begin
//Here iam getting the Id of the industryname selected in the ddl from industry table into an output parameter  @IndustryID
select @IndustryID=Ind_Id_PK from Industry where Industry_Name=@IndustryName
//Here iam getting the Id of the companyname selected in the ddl from company table into an output parameter  @CompanyID
select @CompanyID=Cmp_ID_PK from Company where Company_Name=@CompanyName
//Here iam getting the Id of the plantname selected in the ddl from plant table into an output parameter  @PlantID
select @PlantID=Pl_ID_PK from Plant where Plant_Name=@PlantName
//Here iam getting the Id of the Groupname selected in the ddl from Group table into an output parameter  @GroupID
select @GroupID=G_ID_PK from Groups where Groups_Name=@GroupName
Insert into Audits(Audit_Name,Audit_Industry,Audit_Company,Audit_Plant,Audit_Group,Audit_Started_On,Audit_Scheduledto,Audit_Created_On,Audit_Created_By)values(@AuditName,@IndustryID,@CompanyID,@PlantID,@GroupID,@AuditStartedOn,@AuditScheduledto,@CreatedOn,@CreatedBy)
end
Later called these parameters into class file:
 
namespace xyz{
public class clsCreateAudit
{SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["constr"]);
SqlCommand cmd = new SqlCommand();SqlDataAdapter da = new SqlDataAdapter();public clsCreateAudit()
{
con.Open();
}public void CreateAudit(string Audit_Name, int Audit_Industry, int Audit_Company, int Audit_Plant, int Audit_Group, DateTime Audit_Started_On, DateTime Audit_Scheduledto, DateTime Audit_Created_On, string Audit_Created_By)
{
cmd.Connection = con;cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "CreateAudit";
SqlParameter AuditName = new SqlParameter();AuditName.ParameterName = "@AuditName";AuditName.DbType = DbType.String;
AuditName.Value = Audit_Name;AuditName.Direction = ParameterDirection.Input;
cmd.Parameters.Add(AuditName);
SqlParameter AuditIndustry = new SqlParameter();AuditIndustry.ParameterName = "@IndustryName";AuditIndustry.Direction = ParameterDirection.Input;
AuditIndustry.Value = Audit_Industry;AuditIndustry.DbType = DbType.String;
cmd.Parameters.Add(AuditIndustry);
SqlParameter IndustryID = new SqlParameter();IndustryID.ParameterName = "@IndustryID";
IndustryID.Direction = ParameterDirection.Output;IndustryID.DbType = DbType.Int32;
//IndustryID.Size = 100;
cmd.Parameters.Add(IndustryID);SqlParameter AuditCompany = new SqlParameter();
AuditCompany.ParameterName = "@CompanyName";AuditCompany.Direction = ParameterDirection.Input;
AuditCompany.Value = Audit_Company;AuditCompany.DbType = DbType.String;
cmd.Parameters.Add(AuditCompany);SqlParameter CompanyID = new SqlParameter();
CompanyID.ParameterName = "@CompanyID";CompanyID.Direction = ParameterDirection.Output;
CompanyID.DbType = DbType.Int32;
//IndustryID.Size = 100;
cmd.Parameters.Add(CompanyID);
 SqlParameter AuditPlant = new SqlParameter();
AuditPlant.ParameterName = "@PlantName";AuditPlant.Direction = ParameterDirection.Input;
AuditPlant.Value = Audit_Plant;AuditPlant.DbType = DbType.String;
cmd.Parameters.Add(AuditPlant);SqlParameter PlantID = new SqlParameter();
PlantID.ParameterName = "@PlantID";PlantID.Direction = ParameterDirection.Output;
PlantID.DbType = DbType.Int32;
//IndustryID.Size = 100;
cmd.Parameters.Add(PlantID);SqlParameter AuditGroup = new SqlParameter();
AuditGroup.ParameterName = "@GroupName";AuditGroup.Direction = ParameterDirection.Input;
AuditGroup.Value = Audit_Group;AuditGroup.DbType = DbType.String;
cmd.Parameters.Add(AuditGroup);SqlParameter GroupID = new SqlParameter();
GroupID.ParameterName = "@GroupID";GroupID.Direction = ParameterDirection.Output;
GroupID.DbType = DbType.Int32;
//IndustryID.Size = 100;
cmd.Parameters.Add(GroupID);SqlParameter AuditStartedOn = new SqlParameter();
AuditStartedOn.ParameterName = "@AuditStartedOn";AuditStartedOn.Direction = ParameterDirection.Input;
AuditStartedOn.Value = Audit_Started_On;AuditStartedOn.DbType = DbType.String;
cmd.Parameters.Add(AuditStartedOn);SqlParameter AuditScheduledto = new SqlParameter();
AuditScheduledto.ParameterName = "@AuditScheduledto";AuditScheduledto.Direction = ParameterDirection.Input;
AuditScheduledto.Value = Audit_Scheduledto;AuditScheduledto.DbType = DbType.String;
cmd.Parameters.Add(AuditScheduledto);SqlParameter CreatedOn = new SqlParameter();
CreatedOn.ParameterName = "@CreatedOn";CreatedOn.Direction = ParameterDirection.Input;
CreatedOn.Value = Audit_Created_On;CreatedOn.DbType = DbType.String;
cmd.Parameters.Add(CreatedOn);SqlParameter CreatedBy = new SqlParameter();
CreatedBy.ParameterName = "@CreatedBy";CreatedBy.Direction = ParameterDirection.Input;
CreatedBy.Value = Audit_Created_By;CreatedBy.DbType = DbType.Int32;
cmd.Parameters.Add(CreatedBy);
cmd.ExecuteNonQuery();
con.Close();
}
}
}
Then i called these function into .aspx.cs file:
 
using xyz;protected void btn_CreateAudit_Click(object sender, EventArgs e)
{SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["constr"]);
PCRA.clsCreateAudit obj = new PCRA.clsCreateAudit();
SqlCommand cmd = new SqlCommand();
//Iam getting the Session(UID) from my login page.obj.CreateAudit(txt_AuditName.Text, Convert.ToInt32(ddl_Industry.SelectedItem.Value), Convert.ToInt32(ddl_Company.SelectedItem.Value), Convert.ToInt32(ddl_Plant.SelectedItem.Value), Convert.ToInt32(ddl_Group.SelectedItem.Value), Convert.ToDateTime(txt_StartingOn.Text.ToString()), Convert.ToDateTime(txt_AuditPeriod.Text.ToString()), System.DateTime.Now, Session["UID"].ToString());lbl_Mesg.Text = "Your Audit Details are added succesfully";
}
 
But iam getting an error here near obj.CreateAudit as:
Input string was not in a correct format.
I even want to know if my storedprocedure reaches the requirement which i specified.
please help me with this.Its very urgent.
 

View 1 Replies View Related

I Can't Retrieve Data After Inserting It ?

Mar 1, 2008

Dears,
I'm using FormView to insert and retrieve data from SQL Server Database 2000. I'm using stored procedure to insert and display data by using C#.
Every time I insert the data, I can't retrive it. To retrieve all the inserted data, I have to close my website, and then reopen it again.
I close the connection every time after using the stored procedures, but nothing happened.
What do you think the problem is ??
 

View 3 Replies View Related

INSERTING DATA WITH WEB FORM

Apr 25, 2008

I need help to resolve the following problem. 
I have a form that is supposed to insert data into my data base. But I get an error message when I click submit.
Below is the Code and after that is the error message that I get. Thank you in advance.
 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
End SubProtected Sub insertSubmitBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs)
SqlDataSource1.Insert()End Sub
</script><html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">
 function pageLoad() {
}
 
</script>
<style type="text/css">
.style1
{width: 34%;
}
.style2
{width: 144px;
}</style>
</head><body>
<br />
 
<form id="form1" runat="server">
 
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
 
<br /><asp:SqlDataSource ID="SqlDataSource1" runat="server"
InsertCommand="INSERT INTO property(provinceName, cityName, ownerName, ownerPhone, numOfRooms, rent, ownerEmail, listPeriod, addInfo)
VALUES(@provinceName, @cityName, @ownerName, @ownerPhone, @numOfRooms, @rent, @ownerEmail, @listPeriod, @addInfo)">
<InsertParameters><asp:ControlParameter ControlID="provinceddl2" Name="provinceName"
PropertyName="SelectedValue" /><asp:ControlParameter ControlID="cityddl2" Name="cityName"
PropertyName="SelectedValue" /><asp:ControlParameter ControlID="nameTxtBox" Name="ownerName"
PropertyName="Text" /><asp:ControlParameter ControlID="phoneTxtBox" Name="ownerPhone"
PropertyName="Text" /><asp:ControlParameter ControlID="roomsTxtBox" Name="numOfRooms"
PropertyName="Text" />
<asp:ControlParameter ControlID="rentTxtBox" Name="rent" PropertyName="Text" /><asp:ControlParameter ControlID="EmailTxtBox" Name="ownerEmail"
PropertyName="Text" /><asp:ControlParameter ControlID="listPeriodddl" Name="listPeriod"
PropertyName="SelectedValue" /><asp:ControlParameter ControlID="addInfoTxtBox" Name="addInfo"
PropertyName="Text" />
</InsertParameters>
</asp:SqlDataSource>
<br />
<br />
<br />
<br />
 
<table cellspacing="1" class="style1">
<tr>
<td class="style2">
Contact Name:</td>
<td>
<asp:TextBox ID="nameTxtBox" runat="server" Width="200px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style2">
Contact phone:</td>
<td>
<asp:TextBox ID="phoneTxtBox" runat="server" Width="200px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style2">
Province:</td>
<td>
<asp:DropDownList ID="provinceddl2" runat="server" Width="205px">
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="style2">
City:</td>
<td>
<asp:DropDownList ID="cityddl2" runat="server" Width="205px">
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="style2">
Email:</td>
<td>
<asp:TextBox ID="EmailTxtBox" runat="server" Width="200px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style2">
Number of Rooms:</td>
<td>
<asp:TextBox ID="roomsTxtBox" runat="server" Width="80px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style2">
Monthly Rent:</td>
<td>
<asp:TextBox ID="rentTxtBox" runat="server" Width="80px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style2">
Period to list:</td>
<td><asp:DropDownList ID="listPeriodddl" runat="server"
DataSourceID="listPeriodSqlDataSource" DataTextField="listDays"
DataValueField="listDays" Width="85px">
</asp:DropDownList><asp:SqlDataSource ID="listPeriodSqlDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:PlaceConnectionString1 %>"
SelectCommand="SELECT [listDays] FROM [listPeriod]"></asp:SqlDataSource>
</td>
</tr>
<tr>
<td class="style2">
Additional Infomation:</td>
<td><asp:TextBox ID="addInfoTxtBox" runat="server" Rows="5" TextMode="MultiLine"
Width="200px"></asp:TextBox>
</td>
</tr>
</table>
<br />
;&nbsp;&nbsp;&nbsp;<asp:Button ID="insertSubmitBtn" runat="server" Text="Submit" Width="140px"
onclick="insertSubmitBtn_Click" />
<br/>
 <cc1:CascadingDropDown
ID="Provincecdd2"
runat="server"
TargetControlID="Provinceddl2"
Category="Province"
PromptText="Select a province"
ServicePath="Location.asmx"
ServiceMethod="GetProvince" />
<br /><cc1:CascadingDropDown
ID="Citycdd2"
runat="server"
TargetControlID="Cityddl2"
ParentControlID="Provinceddl2"
Category="City"
PromptText="Select a city"
ServicePath="Location.asmx"
ServiceMethod="GetCity" />
 
</div></form>
</body>
</html>
 
Server Error .


Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.Source Error:



An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:



[ArgumentException: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.]
System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +2132728
System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +108
System.Web.UI.WebControls.DropDownList.LoadPostData(String postDataKey, NameValueCollection postCollection) +55
System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +11
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +353
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1194

 
Hotkwesi

View 1 Replies View Related

Inserting Data Into A SQL Db Using VB && Javascript

May 1, 2008

Greetings to all -
I am trying to enter the date fields from my form into a SQL 2005 db by way of Visual Basic. The VB parameters are as follows:
Protected Sub DataEntry_Btn_NewGig_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataEntry_Btn_NewData.Click        Dim EnterData As New SqlDataSource()        EnterData.ConnectionString = ConfigurationManager.ConnectionStrings("MyDB_ConnectionString").ToString        EnterData.InsertCommandType = SqlDataSourceCommandType.Text        EnterData.InsertCommand = "INSERT INTO Data(Name,ExpertiseID,Description,PONumber,StartDate,EstHours,HourlyRate)VALUES(@Name,@ExpertiseID,@Description,@PONumber,@StartDate,@EstHours,@HourlyRate)"        EnterData.InsertParameters.Add("Name", TBox_Name.Text)        EnterData.InsertParameters.Add("ExpertiseID", Drop_Expertise.SelectedValue)        EnterData.InsertParameters.Add("Description", TBox_Description.Text)
...and so on...
All works well with data input into the ASP form using VB. The problem is, I'm using a Javascript date picker (calendar) to make it easier for users to input the date into the "StartDate" SQL column mentioned above. Do I want to use Javascript to enter this data, or VB?  And, how do I write this code whether it is one or the other?  I want to have all data entered with one button click event.  Also, the code I am using for the calendar date picker is below:
<td><input type="text" name="date" id="f_date_a" readonly="readonly" />
<img src="img.gif" id="f_trigger_a" style="cursor: pointer; border: 1px solid blue;" title="Date selector" onmouseover="this.style.background='blue';"
onmouseout="this.style.background=''" alt="Click to Enter Date"/>
 
<script type="text/javascript">Calendar.setup({inputField : "f_date_a",ifFormat : "%B %e, %Y",button : "f_trigger_a",align : "TL",singleClick : true });
</script></td>
I apologize if this post is in the wrong forum; thanks to all in advance...

View 1 Replies View Related

Inserting Data From TextBox

Feb 8, 2006

Hi,
I'm a newbie to to asp.net. I have been trying to get this done but have no idea how to go about to do it. I am using Visual Studio Express 2005 and SQL Server Express 2005.
I have a database "RECORDS" and a table "NAME" with columns "NAMEID - int" and "NAMERECORDS - varchar(50)"
I opened new website asp.net using vb. In the default I have one textbox (textbox1) and button (button1).
I wish to insert a new NAME to the database whenever I click the Button1. I have created the INSERT command but unsure how to code it. I appreciate anyone can show me how to insert to the database whatever is being typed in the textbox whenever I click the button1. Thanks in advance.
 
 
 

View 3 Replies View Related

Inserting Data Into SQL Server

Jun 1, 2000

declare @counter int

select @counter=300000
while @counter > 0
begin
insert into Revenue (Instr_type, Tel_no, Phone_Id, Rpt_date, Pay_mode)
values("PP0073", @counter, "080464", "19990901", 1)
select @counter=@counter-1
end

HI there,
I run the above statement in Query Analyzer and the expected result should be 300,000 records inserted into Revenue table. But unfortunately the actual records inserted were less than 300,000. I also realise that it insert different amount of record each time I run it. Can anyone please tell me why?

Thanks,
Will

View 2 Replies View Related

Inserting Data To Another SQL Server

Jan 21, 2001

Hi...
I have some problems with inserting data from one SQL Server to another SQL Server in a scheduled time...

Please help me......


Eva

View 1 Replies View Related

Sql 6.5 Error 605 When Inserting Data

May 8, 2000

i get error 605 on several occassions... namely when i am doing a bcp into the database OR when a user is trying to update a record. it seems very sparodic otherwise, but it always happens during the bcp insert. if anyone has any ideas or suggestions on how to correct this issue, it would be greatly appreciated. need additional info?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved