|
No I am not saying that you should do the synchronization by calling update method.
What I am trying to say is that DataSets do not fit well in this scenario.
Typically, a screen has a refresh button in this case. And the user presses the button to refresh the data in the data pane which is generally stored in a DataSet.
Consider the case when the table has 700000 lines, then what will happen. DataSets are designed to handle low transactional small data.
|
|
|
|
|
ok,
If datasets are not the best method, what storage method would I use?
Probably best if I explain what I am trying to do...
Currently I have a php/javascript contacts management system that runs on my companies intranet that I wrote and it currently has approx 7000 contacts in it. The idea of this system is to be a C# application that does exactly the same as the php version but, faster and easier to use.
Now, a lot of my users are not local to the dbase server so I was trying to do the following:
- Use dataset that syncronizes back to the sql server at regular intervals
- Dump dataset to xml & schema for offline content, which would then load locally...and update from dbase server (To save long load times on startup and allow offline editing)
I am fairly new to ADO.NET so I must admit to not knowing all the options available.
|
|
|
|
|
DataSets are very heavy. You chould use instead create your own classes to hold and manipulate the
the data. The data should be fetched from the database(synchronization) on demand.
One question: Why is the client not connecting to the database directly instead on refreshing periodically?
If you want to do this in the database side,
When you select data from table, you put a lock using the below statement:
select * from table holdlock
then other users have to wait for this transaction to be completed for update.
You can even use isolation level 2 (repeatable read) to keep the consistency.
|
|
|
|
|
The reason that I am not designing the system with direct dbase access is that the system will need to be used in offline situations where the user does a syncronization and then goes out on site with a laptop.
The user can make changes offline and then, we he/she gets back online, can syncronize.
This was the other reason I was looking at datasets due to their ability to dump to xml and schema (and import from same) which I was using for offline cache.
I may look into have a table on the dbase that records all changes to any other of the dbase tables hence, rows updated since the last update could be downloaded easily. This might be a way to handle it.
|
|
|
|
|
Friends,
I want to attach a database to SQL server without using Enterprise Manager or query. I have my database file *.mdf in certain directory of my computer. I want to attach it with my SQL server. Is there any way i can attach using regisrty or any file entry or programatically?
Imtiaz
-- modified at 14:04 Sunday 25th September, 2005
|
|
|
|
|
What are you talking about, "attach a Jet database to SQL Server"? What does this mean? What do you want this to do?
SQL Server doesn't really understand Jet databases. You can import the database, but not all the "stored procedures" as Jet understands the concept anyway.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
i am trying to change DataGrid colum order by using the mouse (Drag and Drop). How can i proceed.
thanks
|
|
|
|
|
|
Hi All
I have been stuck on this problem for a week and read every example on the web
I have 2 tables and I have generated a SQL Join Statement that fills a dataset
I display this in a datagrid and all is ok
However when I attempt to push this to the crystal reports object
I get a cross join which does not have any of the criteria applied
The code I execute to generate the dataset is as follows.
Two tables concerned are CustomerInvoices and CustomerAccounts
PK of CustomerInvoices is: UniqueInvoiceID
PK of CustomerAccounts is: UniqueInvoiceID and PaymentNumber
Its like a parent- weak entity relationship
1 invoice many accounts
sqlstr = " SELECT CustomerInvoices.InvoiceID , CustomerInvoices.CustomerID , " +" CustomerInvoices.CustomerName , CustomerAccounts.DateOfPayment , CustomerAccounts.Payment , " + _" CustomerAccounts.PaymentMethod " + _" FROM CustomerAccounts INNER JOIN " + _" CustomerInvoices ON CustomerAccounts.UniqueInvoiceID = CustomerInvoices.UniqueInvoiceID "
Dim Sqladapter As SqlDataAdapter
connection = createDatabaseConnection()
dim receivablesDataSet = New DataSet("DATASETNAME")
Sqladapter = New SqlDataAdapter(sqlstr, connection)
Sqladapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
Sqladapter.Fill(receivablesDataSet )
Dim newForm As New GenericCrystalViewerForm
Dim rpt As New CrystalReport2
rpt.SetDataSource(myDataSet)
GenericCrystalReportViewer.ReportSource = rpt
I dont want to use XML as it gives me an error saying I have a Invalid Key Node
and its driving me crazy
All I want to use is the simple setDataSource method.
By the way I have used all combinations such as
rpt.Database.Tables(1).SetDataSource(myDataSet.Tables(0))
with no luck at all
In summary:
Instead of getting 95 rowsfor example I am getting 65000 rows
which looks like a crossjoin
I would appreciate any help please
Thanks
Touraj
|
|
|
|
|
How to Create DSN by APIs in VB6?
Shoaib Nawaz
|
|
|
|
|
You need to call methods on ODBCCP32.dll
SQLConfigDataSource
Option Explicit
Private Const ODBC_ADD_DSN = 1 ' Add data source
Private Const ODBC_CONFIG_DSN = 2 ' Configure (edit) data source
Private Const ODBC_REMOVE_DSN = 3 ' Remove data source
Private Const ODBC_ADD_SYS_DSN = 4 ' Add a new system data source.
'ODBC_CONFIG_SYS_DSN: Modify an existing system data source.
'ODBC_REMOVE_SYS_DSN: Remove an existing system data source
Private Const vbAPINull As Long = 0& ' NULL Pointer
Private Declare Function SQLConfigDataSource Lib "ODBCCP32.DLL" (ByVal hwndParent As Long, ByVal fRequest As Long, ByVal lpszDriver As String, ByVal lpszAttributes As String) As Long
Public Function AddODBCDSN()
Dim strDriver As String
Dim strAttributes As String
Dim intRet As Long
'since i do not have SQL Server installed....
strDriver = "Microsoft Access Driver (*.mdb)" 'Set the attributes delimited by null.
'See driver documentation for a complete
'list of supported attributes.
'You should use this
'strDriver = "SQL Server"
strAttributes = "SERVER=SomeServer" & Chr$(0)
strAttributes = strAttributes & "DESCRIPTION=Test DSN" & Chr$(0)
strAttributes = strAttributes & "DSN=DSN_TEMP" & Chr$(0)
strAttributes = strAttributes & "DATABASE=c:\test.mdb" & Chr$(0)
'strAttributes = strAttributes & "UID=" & Chr$(0)
'strAttributes = strAttributes & "PWD=" & Chr$(0)
'To show dialog, use Form1.Hwnd instead of vbAPINull.
intRet = SQLConfigDataSource(vbAPINull, ODBC_ADD_SYS_DSN, strDriver, strAttributes)
If intRet Then
MsgBox "DSN Created"
Else
MsgBox "Create Failed"
End If
End Function
|
|
|
|
|
Does Max(NumberFieldName) works in SQL Server? If no then why??
Shoaib Nawaz
|
|
|
|
|
Yes, it works.
SELECT MAX(Count) FROM MyTable WHERE Date < #1/1/2005# -- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
convert interbase database file into sql server database
My question is that through interbase database i have text file and again i want to convert that file in sql server database or any ms-access database is it possible so what r the steps.....
plz reply soon..
brijesh
convert interbase database file into sql server database
My question is that through interbase database i have text file and again i want to convert that file in sql server database or any ms-access database is it possible so what r the steps.....
plz reply soon..
brijesh
|
|
|
|
|
I am sending emails from SQL Server database. I used sp_send_cdosysmail stored procedure to send emails. I have to pass SMTP Server for this procedure.It works sometime for same SMTP Server name, it does not work sometime. Plz suggest solution for this.
Regards
Venkat M
|
|
|
|
|
would appreciate any assistance re creating a table in a MS Access database and filling it with data stored in a dataset
thanks
|
|
|
|
|
sorry I'm coding in vb.net 2003
|
|
|
|
|
Re creating, could you be more specific? There's a lot about this in the web. You just need to look.
<italic>Work hard, Work effectively.
|
|
|
|
|
I would like my program to read data from an excel spreadsheet into a data set then manipulate the data and then create a new table in a MS Access database and populate the table with data from the dataset without using ADOX.
I cant find examples of a table being filled with a dataset that has data from a different source.
any urls (that may assist) would be appreciated
Thanks
|
|
|
|
|
i have a table with just only 1 column(its type is int) and when i make a query on it i need to have the RECORD NUMBER for every record in resault of query. on the other hands, the query should have two culomns: record number column, the Sumation of table field. i cant have identity column for that table. the table should have only 1 column.
sample:
table data:
1000
3000
5000
query data:
1 1000
2 3000
3 5000
my DBMS is SQL Server 2000
please help me with this problem.
Thanks
Rastegar
|
|
|
|
|
There is no concept of RECORD NUMBER in SQL.
If you need a query row number, you can build it using a temporary table with an identity column and dumping the table when you are done. I don't know why you would want to do this since the index in the result set would be equivalent on the client side.
|
|
|
|
|
Hi all.
i have following problem:
there is a DataSet with two tables. A relation between them.
First table (parent) is a DataSource for a DataGid. What I need is:
when I'm navigating in the grid the ComboBox shows appropriate rows (one column ofcource) from child-table.
can anybody help me?
|
|
|
|
|
Hi all,
I wanna Format my database server due to some reason...
so how i can Backup of SQL Server Databases....
i have around 25 Databases in Sql Server.. and i wanna take backup of all..
So how i can perform this task..
plz guide Step by step....
i m new in DataBase Backup ......
Thanx
Sajjad
|
|
|
|
|
just simply copy all data & log files of all databases
then, restore all
<< >>
|
|
|
|
|
I want to enable TCP\IP protocol for sqlserver, for my client server application, at server side. Becoz i m using MSDE as database. I can enable it through by using SvrNetcn.exe, but want to enable it by vb.net code or by command line parameter or any other way with out using any User Interface. How i can do that?
SEC
|
|
|
|