How Do I Do A Look Up And Then Insert Into The Database,
Apr 10, 2008
Hi,
I am getting xml data from a webservice.. and in that xml data there in field called State but on the system that we are getting the data from has a text box where the user can enter NC or North carolina.. But our system is set up to just accept a two letter character. like NC.. So suppose if the user sends North carolina instead of NC the nothing takes places on our system cause we get an error saying that Two many characters..
SO i am looking for ideas that will solve this problem but have the state column accept just 2 letters
any help will be appreciated
KAren
View 2 Replies
ADVERTISEMENT
Nov 14, 2007
I have a web form with a text field that needs to take in as much as the user decides to type and insert it into an nvarchar(max) field in the database behind. I've tried using the new .write() method in my update statement, but it cuts off the text after a while. Is there a way to insert/update in SQL 2005 this without resorting to Bulk Insert? It bloats the transaction log and turning the logging off requires a call to sp_dboptions (or a straight-up ALTER DATABASE), which I'd like to avoid if I can.
View 6 Replies
View Related
Oct 29, 2015
I actually work in an organisation and we have to find a solution about the data consistancy in the database. our partners use to send details to the organisation and inserted directly in the database, so we want to create a new database as a buffer database to insert informations from the partners then make an update to the main database. is there a better solution instead of that?
View 6 Replies
View Related
Oct 26, 2015
I am using two database server. Both are sql server.Â
My task is :I want to insert data from server 1 table to server 2 table and update same when modified the existing data from server 1. is it possible to do the integration in single package.
I know to do insert and update seperately by ssis but need to do same with single task.Â
View 5 Replies
View Related
Apr 15, 2007
Hi,
I have two SQL Express database and I want to do two things. One is to transfer a table over to the other database. Two, move the files from one table in one database to another. Please let me know when you get a chance.
Thanks,
Kyle
View 8 Replies
View Related
Jun 14, 2006
I was able to connect to the SQL Database Pension with table clients with table values: ID, State, Name.'Create(connection)Dim conn As New Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)'open connectionconn.Open()However, I'm not sure how to insert a new row with an incremental ID number and a new State and Name.Sorry, I'm really new with VWD.
View 1 Replies
View Related
May 22, 1999
Hi guys,
I have two sql servers one is Nt server another one is Nt workstation,i am able to admin from both sides.but i don't know how to insert/update one database table to another database table, pls. give me some ideas for this.
Thanks in Advance
Nellai
View 1 Replies
View Related
Mar 19, 2008
Hi,
We have different databases on the same server: Whrs001, Whrs002, etc. All databases have the same structure.
Suppose i have a table "location"
create table location
( location_id int not null primary key,
location_name varchar(50) not null )
I need to inserts data in "location" tables of different databases. But these inserts needs to be across databases. For example from the "Whrs003" database I need to insert data (location_id=123, location_name='markham') in "location" table of "Whrs001" database.
So my thinking is to defined a stored proc which has database name as an argument:
create procedure location_insert
@a_database_name varchar(100),
@a_location_id int,
@a_location_name varchar(50)
as
...
So for the above example the call will be :
exec location_insert 'Whrs001', 123, 'markham'
What would be the actual insert statement in this case? And what things i neeed to take care fo to make sure it always execute successfully?
Thanks
View 5 Replies
View Related
May 7, 2007
hi
i am using this queries is
Insert into excelb.B.dbo.Emp(Employee_Name,Emp_addr) Values (@Employee_Name,@Emp_Addr) select * from excelb.A.dbo.Emp
excelb - server name
now my problem is a server to another server insert the data that not acces the data and i am using different password the servers- but same pasword are insert the data
plz help me
bye
elango
View 4 Replies
View Related
Jul 17, 2006
I'm not sure what the problem is. I am not getting any errors, but I can't get this code to insert into my SQL db. I've checked the permissions on the database and table, and it looks fine.
Is there something wrong with this code? I'm trying to switch from VB to C#, so it's still new to me. I've used the connection string in another APP so I know it works.
If I'm not getting an asp.net error, does that point to a problem with the DB? Thanks.
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection Conn;SqlCommand Command;
Conn = new SqlConnection();Conn.ConnectionString = ConfigurationManager.AppSettings["ConnectionString"];Command = new SqlCommand();
Command.CommandText = "INSERT INTO [tbl_Test] ([test_name], [test_email]) VALUES (@test_name, @test_email)";
Command.CommandType = CommandType.Text;Command.Connection = Conn;Command.Parameters.Add("test_name", tbName.Text);Command.Parameters.Add("test_email", tbEmail.Text);
try
{
Command.Connection.Open();Command.ExecuteNonQuery();
}
catch (Exception ex)
{
lError.Text = ex.Message;
}
finally
{
Command.Connection.Close();pSubscribe.Visible = false;lThanks.Visible = true;
}
View 3 Replies
View Related
Jun 15, 2008
My problem is that when I add a question and the question contains a ' (For instance: I'm going to the store), an error message shows up for 'm from I'm. Here is my code. SqlConnection myConnection = new SqlConnection("Server=???;Database=???;Persist Security Info=True;User ID=???;Password=???"); SqlCommand insertCmd = new SqlCommand(); insertCmd.CommandType = System.Data.CommandType.Text; insertCmd.CommandText = "INSERT INTO TestQuestions (unitChapterID, question, answerA, answerB, answerC, answerD, answer) VALUES (" + int.Parse(DropDownList3.Text.ToString()) + ", '" + questionAddBox.Text.ToString() + "', '" + aAddBox.Text.ToString() + "', '" + bAddBox.Text.ToString() + "', '" + cAddBox.Text.ToString() + "', '" + dAddBox.Text.ToString() + "', '" + answerAddBox.Text.ToString() + "')"; insertCmd.Connection = myConnection; myConnection.Open(); insertCmd.ExecuteNonQuery(); myConnection.Close();
View 2 Replies
View Related
Aug 27, 2006
I Have an error: Server Error in '/quanlythietbi' Application. INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_yeucau_nhanvien'. The conflict occurred in database 'equipment', table 'nhanvien', column 'manv'. The statement has been terminated. Source Error: Line 129:mycommand.Parameters.Add(new SqlParameter("@noidung_yc1",System.Data.SqlDbType.Text));
Line 130:mycommand.Parameters["@noidung_yc1"].Value = TextBox1.Text;
Line 131:int i = mycommand.ExecuteNonQuery();
Line 132:if (i>0)
Line 133:{and this is my code:string sqlstring = "Select * from yeucau where ngayGiaiQuyetxong='"+ Label8.Text +"' and date_yc='" + Label7.Text + "' and manv_yc='"+ TextBox2.Text + "' and noidung_yc='"+ TextBox1.Text+ "'";myconnection = new SqlConnection(stringconn);mycommand = new SqlCommand(sqlstring,myconnection);myconnection.Close();myconnection.Open();mycommand = new SqlCommand(insertquery,myconnection); mycommand.Parameters.Add(new SqlParameter("@ngayGiaiQuyetxong1",System.Data.SqlDbType.Char,10));mycommand.Parameters["@ngayGiaiQuyetxong1"].Value = Label8.Text;mycommand.Parameters.Add(new SqlParameter("@date_yc1",System.Data.SqlDbType.SmallDateTime));mycommand.Parameters["@date_yc1"].Value = Label7.Text;mycommand.Parameters.Add("@manv_yc1",System.Data.SqlDbType.Char,10);mycommand.Parameters["@manv_yc1"].Value = TextBox2.Text;mycommand.Parameters.Add(new SqlParameter("@noidung_yc1",System.Data.SqlDbType.Text));mycommand.Parameters["@noidung_yc1"].Value = TextBox1.Text;int i = mycommand.ExecuteNonQuery();if (i>0){lbcheck.Text = "Ä?ã Cáºp Nháºt Yêu Cầu.";} --------------------------------------------------------------------------------------------------------------------------------I don't know what I must do to repair it :(
View 2 Replies
View Related
Feb 27, 2007
What is wrong with this code the dropdowlist mainlyusing System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Data.SqlClient;public partial class NewAccount : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { } protected void NaccountButton_Click(object sender, EventArgs e) { if (Page.IsValid) { //Define data objects SqlConnection conn; SqlCommand comm; //read from web config string connectionString = ConfigurationManager.ConnectionStrings["OneBank"].ConnectionString; //Initialize connection conn = new SqlConnection(connectionString); //create command comm =new SqlCommand( "INSERT INTO Customer (FirstName, LastName, Street, City, State," + "Zip, Phone, Payee,AccountType)" + "VALUES(FirstName, LastName, Street, City," + "State, Zip, Phone, Payee,AccountType)", conn); //add parameters comm.Parameters.Add("@FirstName", System.Data.SqlDbType.NVarChar, 50); comm.Parameters["@FirstName"].Value=Firstname.Text; comm.Parameters.Add("@LastName", System.Data.SqlDbType.NVarChar, 50); comm.Parameters["@LastName"].Value=lastname.Text; comm.Parameters.Add("@Street", System.Data.SqlDbType.NVarChar, 50); comm.Parameters["@Street"].Value=street.Text; comm.Parameters.Add("@City", System.Data.SqlDbType.NVarChar, 50); comm.Parameters["@City"].Value=city.Text; comm.Parameters.Add("@State", System.Data.SqlDbType.NVarChar, 50); comm.Parameters["@State"].Value=state.Text; comm.Parameters.Add("@Phone", System.Data.SqlDbType.Int); comm.Parameters["@Phone"].Value=phone.Text; comm.Parameters.Add("@AccountType", System.Data.SqlDbType.NVarChar, 50); comm.Parameters["AccountType"].Value = dropdownlist1.SelectedValue.ToString(); //Enclose database in try catc finally try { //open connection conn.Open(); //execute the command comm.ExecuteNonQuery(); //reload query Response.Redirect("NewAccount.aspx"); } catch { //Display error Errormessage.Text= "Error submitting request!"; } finally { conn.Close(); } } }}
This is the table where thisis going
customer ------------- customerID pk generated automatically firtsname lastname street city statezipphoneaccountType
View 3 Replies
View Related
Oct 17, 2007
I am creating a zipcode search radius function for my site, and I downloaded a .sql file containing the info I need.
The problem is that on the latitude and longitude colunm it needs to be entered with a decimal such as 73.5598.
If the column type is Decimal I can manually enter it, but when it's inserted via the script it rounds the number ie. 73
The only type I can get to accept the .sql script as is, is nvarchar, but then it has trouble converting to a numeric for the radius.
This is the script I am entering:
INSERT INTO classifieds_ZipCodes (zip, city, state, state_name, longitude, latitude, rlong, rlat) VALUES ('00501', 'HOLTSVILLE', 'NY', 'New York', '73.0456', '40.8153', '1.27479232112', '0.712308900524')
Any ideas??
Keep in mind there are over 42,000 zipcode entries
Thank you
Daniel Meis
View 4 Replies
View Related
Nov 1, 2007
I have a page with over 20 Textbox and DDL controls and an upload in various Divs and Panels (Ajax enabled) that are used for gathering user data. Some of the fields are mandatory and some optional.
In the Code behind (VB- I am a complete novice) On the submit button click event, I iterate through the controls in the page and build an array with information from the controls that have data in them, (filtering out the non-filled textboxes, and DDLs).
All this works well, and I get an array called 'myInfo' with the columns with the control ID, and control values 'rvalue' (as string), with the number of rows equal to the filled textboxes and DDLs.
I then step through the array and build a string with 'name=values' of all the rows in the myinfo array and email this as a message:
ThisMessage = "" NoOfControls = myInfo.GetLength(0) For i = 0 To NoOfControls - 1 ThisMessage = ThisMessage & myInfo(i).ID.ToString & "=" & myInfo(i).rvalue.ToString & "; " Next
SendMail(email address, ThisMessage)
I also want to add this information to a database, appended by the IP address and datetime.now.
Dim evdoDataSource As New SqlDataSource() evdoDataSource.ConnectionString = ConfigurationManager.ConnectionStrings("SQLConnectionStringCK").ToString evdoDataSource.InsertCommandType = SqlDataSourceCommandType.Text
Dim InsertMessage As String = """INSERT INTO evdoData (" NoOfControls = myInfo.GetLength(0)
Dim k As Integer For k = 0 To NoOfControls - 1 InsertMessage = InsertMessage & myInfo(k).ID.ToString & ", " Next
InsertMessage = InsertMessage & "IPNo, DateEntered) VALUES ("
For k = 0 To NoOfControls - 1 InsertMessage = InsertMessage & "@" & myInfo(k).ID.ToString & ", " Next InsertMessage = InsertMessage & ", @IPNo, @DateEntered" & ")""" evdoDataSource.InsertCommand = InsertMessage
I then similarly iterate through and do the insertparameters.
Now here is the rub- (My all too often DUH moment!)
When I look at the insertmessage in debug (and to be sure- I also show the insert string on a temporary debug label on the page), The insertmessage looks fine:
"INSERT INTO EvdData (FirstName, Age, Email, Phone, Country, City, IPNo, DateEntered) VALUES (@FirstName, @Age, @Email, @Phone, @Country, @City, , @IPNo, @DateEntered)"
However when the above code(evdoDataSource.InsertCommand = InsertMessage) is run, I get an error - the message with the error is:
The identifier that starts with 'INSERT INTO ModelData (FirstName, Age, Email, Phone, Country, City, IPNo, DateEntered) VALUES (@FirsteName, @Age, @Email, @Phone,' is too long. Maximum length is 128
EH? When I actually copy the InsertMessage from the debug window and paste it manually after the command "evdoDataSource.InsertCommand = " It works, and I get the data inserted into the table..
-It would seem that I am probably missing something obvious in my complete "noviceness" . HELP! (oh and thanks a bunch in anticipation)
_____________________________________________________________________________________________________________________
Its Easy --------------------------When you know How. Meanwhile Aaaaaaaaah .
View 4 Replies
View Related
Nov 27, 2007
Hello All,
I want to insert a images into a database and these images save into a one perticular folder.
and i want to use these Images into some Diffrent Diffrent area
please help me
ashwani
View 1 Replies
View Related
Jan 31, 2008
Hello,
I have a textbox on my formview which brings in a time from an sqldatasource. The time is displayed as 09:00:00 in the sql select statement i have a convert function - CONVERT (varchar, Time, 8)
I am trying to alter the text e.g change to 09:30:00 and send it back to the database however i am having a lot of problems with that.
Anyone know what i have to do to sort this. I think it might be something to do with the sql insert or the insert parameters as i dont know how to change the time String back to DateTime.
Any help appreciated. Thanks in advance Mike.
View 1 Replies
View Related
Mar 4, 2008
This is a simple n00b question, but how can I insert the current date time into a datetime field in a database when submitting a form?
I'm using the SQL DataSource control to do the inserting: <asp:SqlDataSource ID="SqlDataSourceMiguel" runat="server" ConnectionString="<%$ ConnectionStrings:SQLDataConnectionToInsertMiguelsTips %>"
InsertCommand="INSERT INTO tblMig(TipTitle, TipBody, TipExcerpt,TipDate) VALUES (@Title,@Body,@Excerpt,@varDate)">
<InsertParameters><asp:ControlParameter ControlID="ctl00$ContentPlaceHolder3$txtTitle" Name="Title" PropertyName="Text" /><asp:ControlParameter ControlID="ctl00$ContentPlaceHolder3$txtBody" Name="Body" PropertyName="Text" /><asp:ControlParameter ControlID="ctl00$ContentPlaceHolder3$txtExcerpt" Name="Excerpt" PropertyName="Text" /><asp:ControlParameter ControlID="ctl00$ContentPlaceHolder3$txtDateNow" Name="varDate" /></InsertParameters></asp:SqlDataSource>
Thank You
View 4 Replies
View Related
Apr 20, 2008
I have a MS-SQL 2005 database that is in a one-to-many relationship that is like this:
Table: Company
CompanyID, company name, address, city, etc.
Table Service States:
CompanyID, StateID
Table: States
CompanyID, StateID, State
The result is that you can have multiple states that are serviced assigned to any particular company.
Then in my ASP, I have a form for adding new companies to the database. On this form I have text boxes for Company name, Address, etc. Then for adding the states that are serviced, since you can have multiple states that serviced I decided to put in a Grid. This works fine if I'm editing the Company since the CompanyID already exists, but when I'm adding a new company, I can't INSERT INTO the Table Service States, since I don't know what the CompanyID is yet.
What would be the best way to handle this situation? I could probably put in a a ListBox with a Dropdown, then a little button with an add, add the items to the Listbox, then do an Insert on the Table Company, grab the companyID, then insert the items from the combobox.
I'm wonder if anyone has any better suggestions or ideas to handle this.
Thanks,
marly
View 1 Replies
View Related
Apr 22, 2008
Hi i want to insert a tables from one database to another based on unique key
View 2 Replies
View Related
Mar 13, 2004
I am trying to insert the current date into my database here is the code I am using
sql = "Insert into tblguestbook(date, name, city, state, email, Url, Comments)Values ('"
sql = sql & Request.Form(Now) & "','"
sql = sql & Request.Form("nametxt") & "','"
sql = sql & Request.Form("citytxt") & "','"
sql = sql & Request.Form("statetxt") & "','"
sql = sql & Request.Form("emailtxt") & "','"
sql = sql & Request.Form("urltxt") & "','"
sql = sql & Request.Form("commentstxt") & "');"
When I review my table the only date that will go into it is 1/1/1900.
Please help
View 6 Replies
View Related
Jul 21, 2005
I have a table changereport and network info.i insert a record with date of insertion plus chagereport id.then I have a xml file
<ChangeReport> <Network-Info> <Version> 2.0</Version> <Highest-Ver> 2.0</Highest-Ver> <Description> WinSock 2.0</Description> <System-Status> Running</System-Status> <Max> 2.0</Max> <IP-address> 192.168.142.1</IP-address> <Domain-Name> samin</Domain-Name> <UDP-Max> 2.0</UDP-Max> <Computer-Name> SAMIN</Computer-Name> <User-Name> samin</User-Name> </Network-Info></ChangeReport>
I want's to insert a record in network info table where field name are nodes name data should be the one against those nodes in xml file .How can I do it I am using sql server
View 2 Replies
View Related
Feb 21, 2006
What have I done wrong with this script?I'm getting an error The ConnectionString property has not been initialized.
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.InvalidOperationException: The ConnectionString property has not been initialized.
Source Error:
Line 73: myCommand.Parameters.Add(New SqlParameter("@Activationcode", SqlDbType.nVarChar, 50))Line 74: myCommand.Parameters("@Activationcode").value = activecode.valueLine 75: myCommand.Connection.open()Line 76: tryLine 77: myCommand.ExecuteNonQuery()
Dim loConn as New SqlConnection(ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_HWB"))Dim myCommand as SqlCommandDim InsertCmd as StringinsertCmd = "insert into Login values (@Username, @Password, @email, @Activationcode);"myCommand = New SqlCommand(InsertCmd, loConn)myCommand.Parameters.Add(New SqlParameter("@Username", SqlDbType.nVarChar, 50))myCommand.Parameters("@Username").value = Username.valuemyCommand.Parameters.Add(New SqlParameter("@Password", SqlDbType.nVarChar, 50))myCommand.Parameters("@Password").value = Password.valuemyCommand.Parameters.Add(New SqlParameter("@email", SqlDbType.nVarChar, 50))myCommand.Parameters("@email").value = email.valuemyCommand.Parameters.Add(New SqlParameter("@Activationcode", SqlDbType.nVarChar, 50))myCommand.Parameters("@Activationcode").value = activecode.valuemyCommand.Connection.open()myCommand.ExecuteNonQuery()myCommand.Connection.Close()
View 1 Replies
View Related
May 29, 2006
I'm trying to make a website that people can upload file to the server, then the webpage will automatically insert the username and the file name into the database. I have thought about this for couple days but still got nothing. can some one help me?
can some one post a very simple aspx file that can insert a record to the sql database with C#? Not the code that generated by ASP.net 2.0!
I want to see how to access the database manually.
Thank you.
View 2 Replies
View Related
Feb 3, 2005
Hi, does anyone know what syntax I have to use if I want to use a trigger to insert into a different database. This is the code I have I'm just not sure how to get it to identify a different database.
CREATE TRIGGER History_replication ON [dbo].[History]
FOR INSERT
AS
INSERT [dbo].[History] (this one shoul dbe on the History_copy db)
(workdone,error)
SELECT workdone,error
FROM [dbo].[History]
Thanks Ed
View 4 Replies
View Related
Mar 22, 2006
SOS
I am working with SQL 2000 located on a Networksolutions server and I have a Test record I inserted manually, but I am unable to insert a new record and get this error "can't insert new record to database".
No doubt this is a no brainer, but I can't solve it.
Many Thanks
Who ever you are.
View 7 Replies
View Related
Apr 10, 2006
hi
It seems that my code can insert data into memory, but not into the database. What I mean is that after "insert data", I can "read data",
which I just insert. When I check the actual database table, it didn't
get updated.
I am using VS 2005 and table designer. Regarding to this problem, is
it related to any setting of setup of the database? I check the code,
and I have no idea how it occurs.
private static string connectionString = null;
private static SqlConnection connection = null;
private static string commandString = null;
private static SqlCommand command = null;
private static SqlDataReader reader = null;
static void Main(string[] args)
{
connectionString = ConfigurationManager
.ConnectionStrings["appDatabase.Properties.Settings.databaseConnection String"]
.ConnectionString;
connection = new SqlConnection(connectionString);
try
{
// Insert data
commandString = @"INSERT INTO userTable
(userID, permissionLevel, mobile, emailAddress, mailAddress, pager) VALUES(1, 2, '123', 'aa@a.com', 'oz', 'no')";
SqlCommand command = new SqlCommand(commandString, connection);
connection.Open();
command.ExecuteNonQuery();
connection.Close();
// Read data
commandString = @"select * from userTable";
command = new SqlCommand(commandString, connection);
connection.Open();
reader = command.ExecuteReader();
while (reader.Read())
{
Console.WriteLine(reader["permissionLevel"].ToString());
}
connection.Close();
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
regards
figo2476
View 5 Replies
View Related
Aug 3, 2006
Hi everyone !!!
The past two days I am trying to make a survey to work !
Unfortunately I haven't accomplised yet :-(
So this is my problem...
I am using ASP, MS-SQL for the survey.
When I take the survey for the first time evetything is working and the fields are inserted correctly in the table !
If I take the survey for the second time... there is no insert in the table !!!
This is code...
dim Rs_Qu
set Rs_Qu = myCon.Execute("Select * From QUESTION ")
if Rs_Qu.Eof then
myCon.Execute ("Insert into QUESTION (" & SqlStr_1 & ") values (" & SqlStr_2 & ")")
Also, I must tell you that when I use the SQL Pane and do ...
Insert into QUESTION (" & SqlStr_1 & ") values (" & SqlStr_2 & ")
replacing of course " & SqlStr_1 & " and " & SqlStr_2 & "
i can insert the entry !!!
Please help !
View 2 Replies
View Related
Jan 31, 2007
hi. we have 1 production database and a 2nd backup database. one of our users accidentally deleted a case and we would like to get it back. our production database is updated nightly so none of the case's information would've changed.
how can i insert the data from the backup database to the production database? i need to copy one row. thanks for your help!
View 1 Replies
View Related
Apr 3, 2015
I need to insert sizes of 'adentureworks' database into 'mydatabase' (table 'size')
-- Taken from sp_spaceused:
SELECT database_name = db_name()
,database_size = ltrim(str((convert(DECIMAL(15, 2), dbsize) + convert(DECIMAL(15, 2), logsize)) * 8192 / 1048576, 15, 2) + ' MB')
,'unallocated space' = ltrim(str((
CASE
WHEN dbsize >= reservedpages
[Code] .....
View 5 Replies
View Related
Feb 25, 2014
I would like to insert a XML file like below into a 2008 SQL Server database.
?xml version="1.0" encoding="UTF-8"?>
<Data>
<records>
<record>
<LogDateTime>2013-11-12T11:51:28</LogDateTime>
<StudentNumber>1245345</StudentNumber>
[Code] ....
View 3 Replies
View Related
Mar 2, 2006
Hello...
I am using SQL Server Express and ASP.net with C#
I need to grab a value from a table in database1 and insert it into a table in database2... not quite sure how to do this?
Any ideas???
Thanks muchos!
View 11 Replies
View Related
Mar 3, 2008
Hello!
I need a little help. I want to load data to sdf database, with Visual Studio 2008. The database is on my PC. I want to copy to PPC, when it has the data. I thought it is easy... First I created a windows form application, and the database. I tried with TableAdapter.Insert(..), no exception, or error, but the database was still empty. DataSet.table.Rows.Add(newtableRow)+tableAdapter.Update works the same. My second attempt was to create a dataGridview. It can show data from the database, but can't insert. No error, but when I restart the application, the new row disappear. (Of course insert function is enabled.)
I was not able to realize the problem. The db is not read-only, and the conncection string works fine, and dataTableAdapter's insert method is also good.
What can be the problem?
Thanks for the help.
Update: The code works with VS2005
View 5 Replies
View Related