|
Anybody know of a work around?
|
|
|
|
|
Copying the changes/additions from the second dataset into the first dataset and then updating the data source.
Fill datasets
if dataset2 only has additions to dataset1
...for each row
.....read row in dataset2
.....create new row in dataset1
.....fill new row with row from dataset2
Update datasource
if dataset2 contains changes to dataset1
...for each row
.....compare row in dataset1 with row in dataset2
.....If there are changes
.......make the changes in dataset1
Update datasource
|
|
|
|
|
Thanks,
Seem to have the additions working, but problems with comparing rows. What is the correct syntax for comparing datarows. Do I have to compare the value of each column in the row, or can I compare the row as a whole.
|
|
|
|
|
I'm just learning all this myself and I would have to compare each column in the rows. Maybe someone else knows of a compare method. A new thread with that question as the topic might get more notice, either here or under the language you are using.
|
|
|
|
|
Hi,
I created a database (sql) and added tables and stored procedures to it using the .NET server explorer.
Now I want to use the database created in a real server (thus move it from my development PC to a real web server).
What is the way to do it? Do I need to create a database project to do that?
Why does the .NET have databse projects if all can be done in the server explorer?
If anyone knows any article about the subject please let me know.
Thanks.
avivhal
|
|
|
|
|
Use DTS or simply sp_detach_db, copy the mdf & ldf files to the new server, and sp_attach_db.
Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
Hi all,
I'm really frustrated...
I used VS.NET's wizard to create an OdbcConnection object. The object uses a system DSN I created, that points to an MS-Access 2003 database. In the database I have a table called Table1, with some fields. One of the fields is the primary key (autonumber). Now I want to create an OdbcDataAdapter object that selects/inserts/deletes/updates Table1 (a table in my db).
I use the data adapter wizard, select all my rows and click "next". The SELECT command is created, but the others are not. The wizard shows me the error in the subj for those commands.
If I switch to OleDbConnection instead of OdbcConnection, everything's ok.
I saw some articles about this bug - something about the db name containing chars like '.'(dot) so how can I avoid it? The file name is "db1.mdb". I can't remove the dot!
thanks.
/=/=/=/= Sagmam =\=\=\=\
|
|
|
|
|
Hi to All !
Can any one pls briefly explain me how to update data using dataset?
I mean i need to create dataset manually thru code, fill the dataset, update an existing record using sqldataadapter's update method.
Thanks for the valuable help
|
|
|
|
|
There is actually a number of steps to doing it manually. You need to make the connection, make the dataAdaptor, make and fill the dataSet. You might check out a a good ADO.NET book and look under untyped datasets.
|
|
|
|
|
I have a Microsoft Access 2000.
How can I set the AllowZeroLength value for a field using an SQL statment?
Thanks
|
|
|
|
|
In my opinion, I think the check box of Allow Null is the place similar to AllowZeroLength in ms access.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hi
I have a local computer(its name is SUN) with sqlserver2000 , IIS and VS.Net.
I have a web app name it WebApplication1 and a database name it Northwind.
When i run this webapplication it runs this portion of code:
System.Data.SqlClient.SqlConnection this.sqlConnection1;
private void Page_Load(object sender, System.EventArgs e)
{
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.sqlConnection1.ConnectionString = "workstation"+
"id=SUN;packet size=4096;integrated security=SSPI;"+
"initial catalog=Northwind;persist security info=False";
this.sqlConnection1.Open();
this.sqlConnection1.Close();
}
but i see this error:
Login failed for user 'SUN\ASPNET'.
In the IIS i cleared Anonymous access check and added user SUN\ASPNET to Northwind database in Enterprise Manager but error didn't fix;
In the same windows app this error doesn't exist.
What should i do plz?
|
|
|
|
|
Dear Programmers,
I have a small problem with sql stored procedure.Does sql storeprocedure
can return more than one recordset (for example say 2 recordsets).
If so can you pls explain me how to get those 2 recordsets through VB
I have already tried the same with single recordset.
|
|
|
|
|
|
Thanks for the solution
one more thing is that i want to get those recordsets through VB 6.0
Please help me
|
|
|
|
|
Use the RecordSet's NextRecordset() method
|
|
|
|
|
Dear Visual Basic & Access Experts
In my application program, I have a Access (version xp) form that calls a update event handler. In this handler I need to know if the user has clicked on the "Close" button of the form. What VBasic codes do we use to check what action triggers off the the chain of events that lead up to the update event & onwards? In particular I am interested to to check if the triggering event is the clicking of the "Close" button of the form; if so I will then write some code to handle this particular case. I tried to handle this via Close event handler but since it comes after the "Update" event, it does not work.
Please help...Cheers! Michael
|
|
|
|
|
How do I detect error while running script with "osql" utility?
Dim cmd As String = "osql.exe"<br />
Dim args As String ="-S localhost -U joe -P xxx -d master -i"<br />
Dim fullCmd As String = args + " '" + scriptfile + "'"<br />
<br />
info = New ProcessStartInfo(cmd, fullCmd)<br />
info.UseShellExecute = False<br />
<br />
ps = Process.Start(info) 'Is there any way to monitor if any error encountered during script execution?<br />
ps.WaitForExit()<br />
Thanks in advance!
Norman Fung
|
|
|
|
|
|
Hi,
(not sure if this is the right forum to post into)
I have an extended stored proc (C++ dll) that calls a managed DLL that calls a web service, and all is going well until the point in the managed DLL that invokes the actual webservice. At that point SQL server complains of a connection lost.
This is probably got to do with the fact that uses SQL, however the webservice is on an entirely different box, with it's own SQL server, so I'm not sure exactly what to do about it.
Has anyone come across this before or has anyone got any suggestions on how to fix it?
thanks in advance
|
|
|
|
|
hi,
im using databases in MsSqlservers but i have a major problem that when i connect to my database by SqlConnection the connection is too slow but when i use query analyzer to get the same date its very fast(about 20 times faster)
i wnat to know if there is a way to speed up the sqlconnection..
|
|
|
|
|
UAU wrote:
when i connect to my database by SqlConnection the connection is too slow
UAU wrote:
i use query analyzer to get the same date its very fast
I'm confused. Do you mean that the act of initially connecting is slow? Or do you mean the act of transfering data to the application is slow?
Also, you don't supply the code you are using so it is difficult to tell if there are any bottlenecks that are causing the problem because I've always had consitent results between the speed of the Query Analyser and my .NET applications.
Do you want to know more?
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums
|
|
|
|
|
hi,
i mean the act of transfering data to my application is slow.
i use sqldatareader in my application and my qurey is just a simple select query,telling that when i tested the connection by SqlDataAdapter the speed was as fast as query analyzer.
is it possible that using Sqldatareader makes the data transfer too slow?
thanks
|
|
|
|
|
|
hi,
here is my code(it runs on a different thread from the main thread of application)
com.CommandText = "select something";<br />
rd=com.ExecuteReader();<br />
if(rd.HasRows)<br />
{<br />
rd.Read();<br />
do<br />
{<br />
}while(rd.Read());<br />
}<br />
rd.Close();<br />
if(cur.Nodes.Count > 0)<br />
{<br />
com.CommandText="select somthing";<br />
rd=com.ExecuteReader();<br />
rd.Read();<br />
}<br />
rd.Close();
i have to run these codes for several times in my application..
thanks
|
|
|
|