Grabbing Mobile Data For Desktop Ui (update/delete/insert)

Mar 11, 2008

Howdy,

Am trying to find a way to insert/update/delete data in a SQL mobile database on a Windows CE 5.0 device FROM a desktop PC.

This situation is completely stand alone, no network (apart form device/desktop), no GPRS etc etc etc.

I've looked at RDA but i dont believe it fits my app. (pulling data from a 2005 server that doesnt exist doesnt really help me much, push can't be used without a pull which kills the idea.)

The goal is a UI on the desktop that can manipulate data in the SQL mobile Database.

I've tried all i can find/think off in relation to this but to no avail.

My latest attempt has been using the simplest method possible (using a VS wizard datasource to the devices DB and tryign to whack that on a form) but this just creates a "Path not found. Check the directory for the database [Path = Mobile Device/ce_swipe/TestDB.sdf".

View 5 Replies


ADVERTISEMENT

How To Update,delete,insert The Data Into Xml Colu

Oct 10, 2007

Hi all,

How to update a particular value in xml file which was loaded into sql server 2005 database
which is of xml-type

How to DELETE a particular value in xml file which was loaded into sql server 2005 database
which is of xml-type

how to INSERT a particular value in xml file which was loaded into sql server 2005 database
which is of xml-type

update XmlCatalog1 set Document1.modify('delete /X12_U1_837/X12_Q1_837/header/ISA//ISA_Authorization_Information_Qualifier') where id=2

----------
The error which i am getting is
XML Validation: Invalid content. Expected element(s):ISA_Authorization_Information_Qualifier where element 'ISA_Authorization_Information' was specified. Location: /*:X12_U1_837[1]/*:X12_Q1_837[1]/*:header[1]/*:ISA[1]/*:ISA_Authorization_Information[1]

View 1 Replies View Related

Insert, Delete, Update Data In Database

Mar 14, 2006

hi. i'm trying to create a c# application which would insert, update and delete data from a database. could anyone pls point me to the right direction in which i should take? thanks in advance.

View 1 Replies View Related

Insert, Update && Delete On Two Tables With Same Data Structure...

Jun 30, 2006

I have created two table with same data structure. I need realtime effects (i.e. data) on both tables - Table1 & Table2.

Following Points to Consider.

1. Both tables are in the same database.

2. Table1 is using for data entry & I wants the same data in the Table2.

3. If any row insert, update & delete occers on Table1, the same effect should be done on Table2.

4. I need real time data insert, update & delete on Table2.

I knew that using triggers it could be possible, I have successfully created a trigger for inserting new rows (using logical table "Inserted") in Table2 but not succeed for update & delete yet.

I want to understand how can I impletement this successfully without any ambiguity.

I have attached data structure for tables. Thanx...

View 10 Replies View Related

SQL Data Source Control...Generate Insert, Update && Delete Statements...

Apr 23, 2008

I have an SQL data source on my page and I select "Table".  On the next screen I pick the fields I want to show.  Then I click the "Advanced" button because I want to allow Inserts, updates and deletes.  But its all greyed out abd I can't check this option. The UID in the connection string I am connecting under has the correct permissions in SQL server to do inserts, update and deletes too.  Anyone know why it would be greyed out? The connectionstring property in the aspx code is dynamic but this shouldn't be the reason because I have used this before with success

View 2 Replies View Related

(SQL Mobile)Can SELECT, But Cannot INSERT/UPDATE. Why Not?

Sep 27, 2006

I'm just getting started with using SQL Server Mobile while creating a handheld app using Visual Studio 2005. So far, I have succeeded in RETRIEVING data from the mobile database, but I don't understand why my INSERT nor UPDATE statements will not work. (I'm assuming they don't work, because after I run my code via the debugger, I oddly get no error message, but when I "open" the table in the Server Explorer, I do not see my expected results. Do I need to do some kind of "commit" or something? Here's my code. Thanks for any help! - Sue

-------------------------------------------

'Create SQL statement:
Dim strSQL As String
strSQL = "INSERT INTO MyTable (col1, col2) VALUES ('yucky', 'poo')"

'Create DB connection:
Dim connDB As New System.Data.SqlServerCe.SqlCeConnection
connDB.ConnectionString = ("Data Source =" _
+ (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.GetName.CodeBase) + "SueUWM.sdf;"))

'Create DB command:
Dim cmndDB As New System.Data.SqlServerCe.SqlCeCommand(strSQL, connDB)

'Open the connection:
connDB.Open()

'Execute the command:
Dim intRecordsAffected As Integer
Try
intRecordsAffected = cmndDB.ExecuteNonQuery()

If intRecordsAffected <> 1 Then
MessageBox.Show("Unable to insert into database.")
End If
Catch ex As Exception
MessageBox.Show(ex.ToString, "Insert Error")
End Try

'close the DB connection:

connDB.Close()

-------------------------------------------

View 1 Replies View Related

SQL Mobile 3.0 (Update And Insert Question)

Feb 15, 2007

Is it possible If I use insert query to insert a record, but the record is already exist, it will automatically change insert to update?

And

I have a row: customer_name, last_update

is it possible to use sql to check if the customer_name I want to update is the same as the customer_name in database, it can automatically stop the update?



View 1 Replies View Related

Sync Between Mobile And Desktop

Oct 6, 2007

Can I synch between a Mobile device using SqlServer Compact and desktop PC running Sql Server Express using Microsoft Synchronization Services?

View 1 Replies View Related

Synchronize Between Mobile Device And Desktop

Oct 5, 2007

I want to create an application for home users which runs on their mobile device (smartphone) and their desktop PC and keeps the data synchronized between them. On their desktop I want to run either SSCE or SSExpress. There are so many options in the SSCE literature, which options should I use? How do I synchronize the data?
The literature has so many options I don't know where to start.

View 1 Replies View Related

Create A Mobile Database On Desktop

Jan 21, 2006

I have searched through this forum and the news group

microsoft.public.sqlserver.ce

for this topic. I only find a post from Darren Shaffer and I requested a document.

Unfortunately, there is not a clear example of how to create a mobile database (sdf) on a desktop machine which contains VS 2005 and SQL server 2005 by using Visual Basic 2005.

I am sure a clear example in VB for this problem would help a lot of people. Hence anybody who knows how to perform this task, Please help these people.

Thanks in advance

Talat

View 1 Replies View Related

SQL Mobile - How To Edit Structure On Desktop?

May 5, 2008

We have a product which uses a SQL Mobile Database under Windows CE 5.0. I would like to be able to change the database structure, i.e. add tables, change table structure , etc. On a copy of the database on my PC and them move the restructured database back to a device. I can access the database from Visual Studio 2005. I can edit tables, add tables, but I can't change the name of a column. Does anyone have a solution?

View 4 Replies View Related

SQL Server 2014 :: Insert Dataset Into Two Tables And Grabbing Identity From One For Other

Jan 2, 2015

Ok I think I will need to use a temp table for this and there is no code to share as of yet. Here is the intent.

I need to insert data into two tables (a header and detail table) the Header Table will give me lets say an order number and this order number needs to be placed on the corresponding detail lines in the detail table.

Now if I were inserting a single invoice with one or more detail lines EASY, just set @@Identity to a variable and do a second insert statement.

What is happening is I will be importing a ton of Invoice headers and inserting those into the header table. The details are already in the database across various tables and and I will do that insert based on a select with some joins. As stated I need to get the invoice number from IDENTITY of the header table for each DETAIL insert.

I am assuming the only way to do this is with a loop... Insert one header, get identity; Insert the detail table and include the IDENTITY variable, and repeat.

View 9 Replies View Related

Update Or Delete With Insert?

Dec 13, 2007

Hi All,
I have this project I'm working on it's Product Content Management System rewrite. I got to the point of updating the Product By Sku and not sure if I should use UPDATE statement or I should DELETE sections assosiated with the ProductContentID and then re-insert them again? I'm not sure which is more afficient?
I can really do both and it's really not that complicated, the only problem I see with DELETE then INSERT is the ProductContentSectionId in the Sections table is going to grow very fast and I'm a bit concerned about it.
We use SQL Server 2000 and we have about 4 bound tables where we keep the data. The one I'm talking about is the sections table where we keep the actual types of product content like a BoxShot, Description, Key Features and so on...
Thank you in advance!
Tatyana Hughes
 

View 3 Replies View Related

Update, Delete, Insert

Jan 8, 1999

I am trying to update a SQL database with data from a Wang system. The Wang data is dumped to a txt file. I then import it into an update table in SQL via Access. Some of the data is new and some of the data is updated records. At this point I have been trying to create a script to update and add data to a table via the query tool in SQL Then delete data from the update table.

I was able to get the UPDATE and DELETE to work but I have not figured out how to insert new records at the same time? Can I use an IF statement? I will apreciate any help or sample code, Thanks.

UPDATE MemberList
Set Name = NameUpd, Address1 = Address1Upd, Address2 = Address2Upd, City = CityUpd, State = StateUpd, ZipCode = ZipCodeUpd, MemberStatus = MemberstatusUpd
FROM MemberList, MemberListUpd
WHERE MemberList.MemberNumber = MemberListUpd.MemberNumberUpd

INSERT ?

DELETE MemberListUpd

View 2 Replies View Related

Delete/insert Vs Update

Jan 22, 2008

Im trying to keep a mirror image of some data Im getting from Quickbooks.

As the records are inserted into the database I need to check if a record exists and either update or insert a new one.

it seems easier just to delete using the tnxid and reinsert vs updating

my question is if I go

begin

INSERT INTO QBInvoicesQue(100s of feilds)

end


begin

delete from QBInvoices where txnid = @TxnID

end

and there is not matching txnid to delete from will it cause any problems? before going to the insert statement?


begin

INSERT INTO QBInvoices(100s of feilds)

end

View 6 Replies View Related

Update = Delete &&amp; Insert?

Oct 16, 2007

I vaguely recall reading an article that I can no longer find that an update statement is executed as a combination of a Delete and an Insert by SQL server. Does anyone know if this a still a true statement in SQL Server 2005?

Thanks,

-shl

View 10 Replies View Related

VS 2005 - VB.NET - Connect To Mobile SQL Database From Desktop PC

Jun 7, 2006

I want to physically move my .SDF file to my desktop and then access this file from VS 2005 VB.NET. Ideally, I would want to access this .SDF file from MS Access 2003 but I undersand this is not possible.

Here are my VS 2005 VB.NET statements....

Dim ConnPPC As New System.Data.SqlClient.SqlConnection("Data Source = C:Documents and SettingsG014436My DocumentsSQL

MobileActMgr6CE.sdf")

Dim mySqlDataAdapter2 As New SqlDataAdapter("select * from T0002_AE_Activity_Entry", ConnPPC)

mySqlDataAdapter2.Fill(myDataSet2)

On executing the last statement(fill)...I get the following error.

function failed: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Does anyone have any suggestions?

View 6 Replies View Related

SQL Mobile In Pocketpc 2003 Se Desktop Connection

Aug 2, 2006

Hi

I'm developing a pocketpc 2003 application with visual studio 2005. It has a sql server mobile sdf file call datos.sdf.

I need to create a Windows Desktop application and i need to connect it when pocketpc is connected to desktop with activesync.

Any ideas or links with some code samples?

I have installed sql sever everywhere but i don't understand how i can do that connection.

Thanks

View 3 Replies View Related

Synchronize Desktop SDF &&amp; Mobile SDF - MS Sync Services

Apr 29, 2008

I have been able to use MS Sync Services to sync an MDF file & an SDF file (Works great! Very easy!).

What I would like to know is if I could sync an SDF file with another SDF file (making an SDF file a desktop DB and the other a Mobile DB)?

Thanks,

V

VS 2008
SQL 2005 Express

View 3 Replies View Related

Best Practices For Insert/Update/Delete

Jul 24, 2007

 for now, doing a small school project, i find doing SPs for Insert useful, like checking for existing data and not inserting, that might not be the best method, i had advice from here i can use unique constraints instead, then what about update and delete? SPs also? the pros make SPs for everything? currently use dynamically generated SQL from SqlDataSources. for Update / delete. some delete are SPs too...

View 2 Replies View Related

Can't Update, Insert, Or Delete Rows

Oct 20, 2007

I have recently started an ASP.Net application and am having some issues updating, inserting and deleting rows. When I started working with it, I was getting errors because it could not find any update command. Eventually, I figured out how to automatically generate the commands, by configuring my SQLDataSource control and clicking the "advanced" button. Right now though, I have generated the commands, but I still can not insert, update or delete rows. When I attempt to update anything, I recieve an error that says "The data types text and nvarchar are incompatible in the equal to operator." Nowhere in my table do I have any rows that use the datatype "nvarchar", only "text" and "int". I tried switching all of my text columns to "nvarchar(500)", which did not help. I am led to believe that the auto generated SQL procedures are trying to do something behind the scenes that is making my database act up, because even when I delete rows, I get the same exception, so the datatypes cannot be messed up there, because all that the datasource is doing is deleting rows, therefore there is no need to worry about data types. I only get the error when I check the "Use optimistic concurrency" box. When I do not use optimistic concurrency, I can delete, insert, and update rows... but nothing happens. There are no errors, but nothing is deleted, updated or inserted either. Upon postback, nothing has changed. I may upload a copy of the exact exception page, if someone thinks that it may help. Here is the update command that was generated: UPDATE [Record Information] SET [Speed] = @Speed, [Recording Company] = @Recording_Company, [Year] = @Year, [Artist] = @Artist, [Side 1 Track Title] = @Side_1_Track_Title, [Side 1 Track Duration] = @Side_1_Track_Duration, [Side 2 Track Title] = @Side_2_Track_Title, [Side 2 Track Duration] = @Side_2_Track_Duration, [Sleeve Description] = @Sleeve_Description WHERE [Record Database ID] = @original_Record_Database_ID
Apparently no stored procedures exist for any of these operations, and I am unsure why. The "Record Database ID" is my identity column, and is the only field that is (and is supposed to be) uneditable.

View 1 Replies View Related

SQL Update/Insert/Delete Problem

Nov 13, 2005

Hi,I just upgraded my ASP.NET 2.0 BETA 2 environment to the final release of ASP.NET 2.0 VWD.Once the update was finished, I could open my website without any problems..... Now, I noticed that in the final release, some modifications have been included in the Membership Stored Procedure and other stored procedures. So I created a new database (SQL Express) and added my data again.After re-creating my SQLDataSources, I tryed to enable the Editing and Deleting option in VWD and once I run my web application, it seems when selecting editing and then update, it doesn't work anymore....This is my code :
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:IMMOASPNETDBConnectionString %>"
DeleteCommand="DELETE FROM aspnet_test WHERE (testID = @Original_testID)" SelectCommand="SELECT BuyID, BuyNL, BuyFR, Lastupdated FROM aspnet_Buy"
UpdateCommand="UPDATE aspnet_Buy SET BuyNL = @BuyNL, BuyFR = @BuyFR WHERE (BuyNL = @original_BuyID)">
<DeleteParameters>
<asp:Parameter Name="Original_testID" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="BuyNL" />
<asp:Parameter Name="BuyFR" />
<asp:Parameter Name="original_BuyID" />
</UpdateParameters>
</asp:SqlDataSource>
&nbsp;<br />
&nbsp;<br />
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
DataKeyNames="BuyID" DataSourceID="SqlDataSource1">
<Columns>
<asp:CommandField ShowEditButton="True" />
<asp:BoundField DataField="BuyID" HeaderText="BuyID" InsertVisible="False" ReadOnly="True"
SortExpression="BuyID" />
<asp:BoundField DataField="BuyNL" HeaderText="BuyNL" SortExpression="BuyNL" />
<asp:BoundField DataField="BuyFR" HeaderText="BuyFR" SortExpression="BuyFR" />
<asp:BoundField DataField="Lastupdated" HeaderText="Lastupdated" SortExpression="Lastupdated" />
</Columns>
</asp:GridView>Can someone help me with this ? What is wrong with the Update command ?Thanks to all,Bart

View 3 Replies View Related

SqlDataSource: Insert, Update And Delete Not Available

Jan 3, 2006

Hello Guys,
 
I’m trying to create a sqlDataSource using the wizard, I can get the select statement, the here clause and the order by clause but when I click on the Advanced button the options to generate the insert, update and delete statements are not available. Does anyone know what am I doing wrong?

View 4 Replies View Related

Insert, Select, Update And Delete

Apr 7, 2006

I've got four pages with in the first page a insert, in the second a select, in the thirth a update and in the fourth a delete statement. First the values of a textbox will be inserted in the database, then the values will be shown in labels and than it is possible to edit or delete the values inserted. Every inserted item belonging to each other has one ID. The follwing values has a second ID etc.
How can I make that possible?? I think that I should pass the ID's between the pages so I'm sure that I edit or delete the values that I want. So insert value 1 in page 1, show with select value 1 in page 2, edit or delete value 1 in page 3 and 4.
Maybe I didn't explain it good enough for you, please tell me then!!
Thanks!!

View 3 Replies View Related

TRIGGER FOR INSERT,UPDATE,DELETE

Aug 15, 2001

I HAVE TWO TABLES IN THE DATABSE AND THE SECOND TALE SI FOR AUDITING.
I WANT CREATE THE TRIGGER ON FIRST TABLE SO THAT I CAN PUT THE STATUS
LIKE INSERT,UPDATE OR DELETE IN THE STATUS COLUMN IN SECOND TABLE.
CAN SOMEBODY HELP IN WRITING THAT TRIGGER..?
HOW CAN I DETERMINE WAETHER THE RECORD IS BEEN INSERTED OR UPDATED OR DELETED.

DO I HAVE TO WRITE A SEPERATE TRIGGER FOR EACH ACTIVITY..OR I CAN WRITE IT IN THE
SINGLE TRIGGER..?

PLEASE SUGGEST ME..ITS URGENT.

THANKS IN ADVANCE
HARISH

View 2 Replies View Related

What Is Faster?! Update Or Delete And Insert

Dec 6, 2007

Hello,

What is faster / better for performance?

Check if something already excist and update the changed values? or delete the whole table and then insert everything?

Thanks!

View 2 Replies View Related

Insert/ Update/ Delete Slowness.

Jul 10, 2006

SQL2K sp4

Howdy all. I opened a 200 mb. file in Query Analyzer that is full of Inserts/ Updates/ and Deletes. I tried just to parse it, and killed it after 18 hours. There is no blocking. All of the appropriate indexes exist. I even removed them and retried JIC. The box is plenty powerful for this task. Does anyone have any ideas?
I've tried several times with no luck. At the top of the file is SET IMPLICIT_TRANSACTIONS ON and then every 10,000 statements is COMMIT WORK. I've tried adjusting the number of commits to a lower number with no luck. This works fine on smaller files (3 - 20 mb).

View 1 Replies View Related

How To Insert / Update And Delete Without Merge

Feb 18, 2014

How to Insert,Update and delete through script without using merge.I have simple requirement of Deleting,Inserting and Update from one table to other table...Here is the Sample Data

CREATE TABLE #Table1
(ID INT ,Name VARCHAR(30),DATEKEY INT)
INSERT INTO #Table1 (ID,Name,DATEKEY)VALUES (1,'Mohan',20131231)
INSERT INTO #Table1 (ID,Name,DATEKEY)VALUES (2,'Raj',20131231)
INSERT INTO #Table1 (ID,Name,DATEKEY)VALUES (3,'Majja',20131231)
INSERT INTO #Table1 (ID,Name,DATEKEY)VALUES (4,'Majjaa',20131231)

[code]...

So now i need to update 1st record and add another new record..So i need to update as well as delete the existing data in Target table.

INSERT INTO #Table1 (ID,Name,DATEKEY)VALUES (5,'Macha',20131231)

My output should come like this one :

IDNameDATEKEY
1Mohan20131231
5Macha 20131231

with out using merge how can i handle Update,insert and Delete through TSQL

View 5 Replies View Related

Insert Update Delete Trigger?

Dec 2, 2014

I have to create a trigger that will log who changed information on a table and when (NOT what they have changed).

My idea is to get the users name and see if it is in a table if not create it and get the associated ID, also get the ID of table that was accessed along with the ID of the type of task that was performed. Take this data and insert it into a table.

Here is the SQL I have so far.

-- Primary Database Tables --
CREATE TABLE Physician (
Physician_ID int not null identity(1,1) primary key,
First_Name varchar(100),
Last_Name varchar(100),
Mobile_Number varchar(15),
Pager_Number varchar(15)

[code].....

View 1 Replies View Related

SSIS Delete/Insert/Update

Mar 20, 2006

I am still learning SSIS.

What is the best way to do delete/insert/update in a database in SSIS. I am looking to achieve something similar to what was there in a Data Driven Query in SQL Server 2000. I would like to delete/insert/update the destination table based on the condition that my lookuptable returns

For ex

If "the user in my source table has changed the status" Then

Update the user row in the destination table

Else skip the row

If "the user in my source table has delete flag =1 " Then

Delete the user in the destination table

Else skip the row

If "the user in my source table is new(has a new ID) " Then

Insert the user in the destination table

Else skip the row







Any suggestions ....

Cheers

Siaj

View 6 Replies View Related

Insert/Update And Delete Change

Sep 2, 2006

hi,

I have a table which contained 5 columns and with 2 primary keys

Col 1 | Col 2 | Col 3 | Col 4 | Col 5 |

ab | 1 | abc | null | null

ab | 2 | def | null | null



Col 1 and Col 2 both are primary keys.



How do I update Col2 from 1 to 2 and from 2 to 1 in a single transaction statement and commit it?

Thanks







View 3 Replies View Related

Can Not Connect To Desktop Sql Database From Mobile Device (Pocket PC)

Apr 4, 2006

Hi,

I am developing an application for a Pocket PC (PPC). I am using Visual studio 2005, and the Operating system on this PPC is Window Mobile 2003 SE. The followings are my codes to connect PPC with the database on my PC with sql server 2005. But when I cick the button1, the error with "SQL Server does not exist or access denied." Any ideas? Thanks a lot.



Imports System.IO

Imports System.Data

Imports System.Data.SqlClient

Imports System.Math

Imports System.Drawing

Imports System



Public Class Form1

Dim strConnection As String = "Server=localhost;Integrated Security=SSPI;database=AdventureWorks"

Dim strQuery As String

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Label1.Text = "Hello, Clicking after."



ReadOrderData()

End Sub



Private Sub ReadOrderData()

Dim queryString As String = "select * from Person.Address where AddressID < '10'"

Using connection As New SqlConnection(strConnection)

Dim command As New SqlCommand(queryString, connection)

connection.Open()

Dim reader As SqlDataReader = command.ExecuteReader()

While reader.Read()

MsgBox(String.Format("{0}, {1}", _

reader(0), reader(1)))

End While

reader.Close()

End Using

End Sub

End Class

View 15 Replies View Related

Creating SQL Server 2005 Mobile Edition On Desktop

Dec 17, 2005

Hello Everybody

I want to create SQL server 2005 mobile database on desktop programmatically with some inital data for my application and load it into device. We can create database only in VS2005 server explorer or SQL server 2005 application.

Anybody having this solution for this prob.

 

Regards

Chikuu

 

 

 

View 7 Replies View Related







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