Posts

Showing posts from 2017

How to write and read from Registry in C#?

Image
Local data storage in client machine developer use registry.this store small data like application settings.It can modify manually to edit in regedit . In this post we learn about read and write in registry.Registry is one structure of data by link or keys and sub keys. For write in registry need to create key or path where want to write.so if we have key then open it and not then create it. RegistryKey Newkey = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\NewKey"); Registry.CurrentUser => "\HKEY_CURRENT_USER\" @"SOFTWARE\KeyName" => this key is located on "HKEY_CURRENT_USER\Software\NewKey" CreateSubKey() => create new key RegistryKey Key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Key",true); OpenSubKey() => opne allready exist Key OpenSubKey(@"SOFTWARE\Key",true) => OPen "HKEY_CURRENT_USER\SOFTWARE\Key" and second parameter "True" is allow write keys otherwise not permit ...

How to reset Autonumber column from 1 after delete all table data in MS Access?

Image
MS Access is basic and stander database for developers.essay to use and work. Normally like work in excel.now we discuss for our topic "How to reset Autonumber column from 1 after delete all table data in MS Access?". Some time developers work on db and after deployment time need to reset or blank database for user use.no testing data in it.so developers need to reset identity ( Primary,Autonumber  ) column.for that need to query on db for reset to 1 or want to any numbers. "ALTER TABLE # yourTable # ALTER COLUMN # column-name # COUNTER(1,1)" Execute this query with edit your table name and column name. You can also set gaps in increment and set start of numbers.like want to start from 1001 and gap with 10 then this is possible to do in. Related Post How to get html of web page in string by web page url. Export datatable data in Excel Fill datatable from access database CRUD Operations in win form application with access database