|
txtFirstName.DataField = "FirstName"
Set txtFirstName.DataSource = Adodc1
...
Set txtFirstName.DataSource = Nothing
Copied from an article[^] on databinding
I are Troll
|
|
|
|
|
Hi,
Can Anyone guide me with scenario below:
I have two applications A and B with its respective database. One table is the same by both applications. For example Officer Profile table. In application A, Officer Profile table get updated very often.
So I have a Connection button in application B to get the updated records from Application A ..
Once connected, I want to show all available tables. and I want to import a selected table.
I want to have a restriction whereas if table is not resided on both databases it cannot be imported..
Steps are:
Connection->select tables(ex.Officer Profile table)->Import table(ex.Officer Profile table)
Now Officer Profile table for database in application B get updated.
Hope I'm clear with my explaination..
Thanks in advance
|
|
|
|
|
You want to synchronize tables that reside in different databases? What database are you using?
SQL Server[^] has good support for replication
I are Troll
|
|
|
|
|
Hi,
Thanks for replying..
Visual Studio 2005 and Sql Express
|
|
|
|
|
waner michaud wrote: Visual Studio 2005 and Sql Express
SQL Express cannot serve as a Publisher or Distributer, only as a Subscriber[^]. There's also the Microsoft Sync Framework to consider, but I couldn't find much examples on Sql Express[^].
The alternative would be to synchronize the data manually. There's a CodeProject article here[^] that explains how this could be done.
I are Troll
|
|
|
|
|
Hi,
thanks again for the information you provided me..
Ok.for my purpose I only need to work with one table..
one table from the source and one table to destination..
destination table has no foreign key constraint..
OfficerTable on the destination database is solely there for searching..
I can do basecally anything on it such(del, alter, modify and so forth) since no constraint..
I think using a stored procedure will be ideal situation in my case..
The article is bit convoluted, with my very litle experience in sp..
can you lead me a bit so I don't get lost in a carbweb.. I do not like to waste valuable in something I am not good at..
Briefly, my cenario is as such, Open a connection, select OfficerTable from the source, send it to destination database which was the original point of initiating the connection to modify OfficerTable in destination.
Once again, I thank you..
|
|
|
|
|
waner michaud wrote: The article is bit convoluted, with my very litle experience in sp..
No worries, experience comes from doing
waner michaud wrote: I do not like to waste valuable in something I am not good at..
If the client wants it, then somebody has to build it. Building yields experience and valuable knowledge.
waner michaud wrote: Briefly, my cenario is as such, Open a connection, select OfficerTable from the source, send it to destination database which was the original point of initiating the connection to modify OfficerTable in destination.
Let's make three scenario's out of that;
0) Records to be deleted from Destination database table
1) Records to be inserted into Destination database table
2) Records to be updated in the Destination database table
The link to the CodeProject[^]-article contains example sourcecode on performing those three steps using stored procedures.
I are Troll
|
|
|
|
|
Hi,
Must I create a sp for delete, insert, and update that reside in the database for the destination table and as well in the source database?
Thanks
|
|
|
|
|
waner michaud wrote: Must I create a sp for delete, insert, and update that reside in the database for the destination table and as well in the source database?
According to the article, you'd only have to create stored procedures for the destination database
I are Troll
|
|
|
|
|
Hi,
Ok. since I need the destination table for search only. Can I just simply alter the destiantion table?
thanks..
|
|
|
|
|
waner michaud wrote: Ok. since I need the destination table for search only. Can I just simply alter the destiantion table?
Would it be OK to overwrite the destination-table with the source-data? If that's the case, then DROP the destination table and do a SELECT INTO . That would create a new table, based on the data that the query returns.
If you want readonly remote access to a table in a different database from the same server, then a view could be another alternative;
CREATE VIEW [destinationDb].[dbo].[RemoteOrders]
AS
SELECT *
FROM [sourceDb].[dbo].[Orders]
I are Troll
|
|
|
|
|
hi,
I am getting the concept of stored procedure a bit..I am going to create a sp to do DROP AND INSERT INTO.
which the following Should I do?
I am using dataset.
I will have a Connect_to_HNP_button. Once I establish a connection, I want to show all the tables. Select OfficerProfile_table, and then call the sp to import table.
Or on the Connect_to_HNP_button_click event call the stored procedure. Inside the sp, establish the connection, and then do DROP DESTINATION OfficerProfile_table, and INSERT INTO DESTINATION OfficerProfile_table FROM THE SOURCE..
Which way to go and how?
Thanks
|
|
|
|
|
waner michaud wrote: Which way to go and how?
The second option: create a form, drop a button on it, and make it call a stored procedure. Create a table and see if you can drop it from code
I are Troll
|
|
|
|
|
Hi,
Ok..I'll keep you posted..
Thanks
|
|
|
|
|
hey experts
when i deploy my application on user system after that if i copy the installed application from program files and paste it on another system it runs without running setup. i want to make my application secure. how can i do this, waiting for help
i also want to use trial version and full version facility.
Regards
Narendra Singh
(Jindal Tech Ventures)
|
|
|
|
|
Hi NarendraSinghJTV,
to make secure your Windows application you can use Windows registry editor. Code your application to check some values in registry to check whether the application is installed or cop-paste.
You can also use some temp files for the same.
For trial and full version application, you need to keep installed date of application in a secure file and check everytime current date when the application is launched. If current date is more then trial time then it should ask to enter key or something like that.
I hope you got what you wanted!
Gagan
|
|
|
|
|
hey gagan
i have cleared my first problem with the help of registry , but can u please tell me how to work with secure files in c#. i dont know about secure files. it will be very helpful for me
thanks for replay
Regards
Narendra Singh
(Jindal Tech Ventures)
|
|
|
|
|
A secret file is nothing but an ordinary file in encrypted format. Use any encryption-decryption algorithm to make a file secure. The same algorithm can be used to store and retieve values in registry so that it can't be read or modified by the user.
|
|
|
|
|
Registry and/or secret file as pointed out by the previous post are good enough for normal use. People can always find the registry key or the secret file and modify it. They can also turn back time briefly to run a trial version of the program if it is setup that way.
To be more secure, you need to gather information about the machine that the setup program had run on, and encrypt it, then save it to the registry. Each time the program is run, it gathers the same information, encrypt it using the same algorithm, and compare the result in the registry. One of these things will happen:
1. The information in the registry is the same as the newly encrypted information. The program can preceed.
2. The information in the registry is different as the newly encrypted information, indicating that the registry was messed with by somebody, or it's a different machine. The program will terminate.
3. The information in the registry is not found. The program will terminate.
The information collected can include things like the MAC address of the NIC, as well as other ID's that are different from machine to machine.
There is a risk that people can install your program on multiple machines, and read the registry to find out what algorighm you used to encrypt the information. They have also to try to find out what information is collected. That take a good effort. Hopefully that will intimidate them off.
For the implementation of a trial version of your program you need to implement similar algorithms but rely on other resources for time, such as that from the Internet. You can also put checks on time consistancy so if you find that the time is messed with, the program simply terminates.
Once any of the above checks fails, the program should put a mark down (also encrypted) so later runs of the program, even though it may pass the checks, will not authorize a "go". The program will be dead.
|
|
|
|
|
hey
thanks for great reply
can u please point out some example to make me easy to work with those conditions, it will be very helpful for me
Regards
Narendra Singh
(Jindal Tech Ventures)
|
|
|
|
|
Hi All
Can anyone suggest me an idea for reading .dxf file
Regards
Gany
|
|
|
|
|
DXF file is as per the following http://en.wikipedia.org/wiki/AutoCAD_DXF[^]
You will either need to find a free viewer or library to use these files...or if you have a lot of time to spare, write your own.
|
|
|
|
|
Hi all...
I want to create a simple program which takes a file and compute its hash value, also it will check whether the file is corrupt or damaged or not.
I googled a lot but I did not get any code for that error detection.
If you have any piece of code then suggest me..
Thanks.
Gagan
|
|
|
|
|
If you generate a hash value when the file is generated. and then re-check the hash at a later date, you will know that the file is still the same and not-corrupted if the hash value doesn't change.
Do a search for MD5, SHA1, SHA256 etc.
|
|
|
|
|
Hi,
I have some high-performance C# code that reads any file and calculates a CRC32 for it; it is table-driven to get maximum speed. There is an infinite number of definitions for checksums, hashes and the like, however my code returns the same value that is reported by ZIP utilities such as WinZip.
If you're inexperienced in bit fiddling, you may have some trouble in translating it to another language, especially VB/VB.NET; not sure the automatic translators such as this one[^] would do a good job here.
Interested?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|