VB. NET WEB FORM Autocomplete textbox with dataset - from ado .net dataset designer
A basic dataset in VB.NET with the get method.
I will use this method to return all the data from the list. I have no idea as to how much calls i am going to be placing on this dataset, it will be wise to call this at "Form Load" and save the list on the client in some kind of generic list, etc.
' A global vairable to hold the list
Dim col As New AutoCompleteStringCollection
' populate only on the form load to ensure one call is made to the database
Private Sub OwnersPartiesFrm_Load(sender As System.Object, e As System.EventArgs) Handles 'Load List of Known Names
Dim KnownnNamesDF As New KnownNamesDSTableAdapters.ListofNameTableAdapter
Dim KnownNamesDT As New KnownNamesDS.ListofNameDataTable
KnownNamesDT = KnownnNamesDF.GetData()
For i = 0 To KnownNamesDT.Rows.Count - 1
col.Add(KnownNamesDT(i).KnownNames.ToString)
Next
End Sub
'Use the variable to populate on the textbox enter event ( better performance over the text changed event)
Private Sub TextBoxName_Enter(sender As System.Object, e As System.EventArgs) Handles TextBoxName.Enter
TextBoxName.AutoCompleteMode = AutoCompleteMode.Suggest
TextBoxName.AutoCompleteSource = AutoCompleteSource.CustomSource
TextBoxName.AutoCompleteCustomSource = col
End Sub
Processing Large Survey Datasets
Sunday, January 27, 2013
Monday, January 7, 2013
AUtoComplete with a text box in VB Win Forms
Dim cmd As New SqlCommand("SELECT columnname FROM table", conn)Dim ds As New DataSetDim da As New SqlDataAdapter(cmd)da.Fill(ds, "list") // list can be any name u wantDim col As New AutoCompleteStringCollectionDim i As IntegerFor i = 0 To ds.Tables(0).Rows.Count - 1col.Add(ds.Tables(0).Rows(i)("columnname").ToString()) //columnname same as in queryNextTextBox1.AutoCompleteSource = AutoCompleteSource.CustomSourceTextBox1.AutoCompleteCustomSource = colTextBox1.AutoCompleteMode = AutoCompleteMode.Suggest
I will do this with a dataset.
http://www.daniweb.com/software-development/vbnet/threads/358691/textbox-autocomplete-from-database
Thursday, February 16, 2012
ICT the way forward for Grenada
During the Week of February, 7 2012, Grenada celebrated 38 years of Independence. With the lapse of time, the development of a Nation and the creation of several levels of interactive change enablers has saw it face in over these 38 years in the tri-island of Grenada, Carriacou and Petite Martinique. The revolution (1979 - 1983), the passing of hurricane Ivan of 2004 and the way forward using ICT - internet and telecommunication technologies.
Computer are nothing new to the people of Grenada. It has been recalled that much use of the desktop computers have been know both in the private and public sectors largely as tools for document preparation and communication.
Over the past 10 years the introduction of computers into the secondary school system was seen as a game changer by the then leaders of the nation and the education system. Today, early 2012, few are the indicators of productive change due to the intervention.
Small island states, with their limited resource - human and financial can only see to empower its people with sound literacy and numeracy skills inclusive of appropriate technologies that can enhance their communities and lifestyle, while ensuring the social and economical cost are not the future burdens of a barren tree.
The past decade has seen global changes in the way people work and live, commute and communicate. Business large or small has been affected by the global reach of technology and more recently the medium of the Internet. New risk has been realized, no longer monopolies exist due to location or human skill sets for the Internet has broken many barriers that once stood out with the commerce of the "brick world".
Today the companies that once was incubating ideas are now the giants of the commerce world.
Living today, early 2012, one will envisage a better country, even better ideas, implementation and a better standards of living. However, we are undergoing a greater purging, thanks to a global crisis. In keeping with times one must adapt to the new technologies at any cost. One is seek to walk with the rapid and continuous change, even before return on investment are realize. Without conscience out limited resources have been depleting and greater today are our deficits than our profits. Can a small state survive in a global market, once that has been forged by game changers, by the minds of men where their resources base is much more than we can count? We need solutions, from the few that cares for the many that need to survive.
We cannot compete! We should rethink competition and forget partisanship, mergers and friendships to create the atmosphere that can drive, develop and globally market the resource, products and human capital of our nation.
We are currently moving into a phase of new technological era, one where the word "utility company" seem to be the watch world and game changer. No longer will be world be seeking desktop computer, but smartphone, tablets and newer smart devices. The jobs for the hardware technician is dwindling and much less will be the need for the IT processional. The soon will be no need to repair the computer, but a full replacement will be on the way. The need for expensive software once costing hundreds of US dollars, is soon be be paid for per usage. At the end of the day, when it all adds us, the cost of technology will be viewed as my next utility bill - data plan EC 60.00, my mobile movies $2.99USD, the next great app $5.00USD and my contact in the cloud $12.00USD per year.
In the a small eco-sphere as Grenada where out active population is in the thousands, our country will be once again shifted into a deep "follow-ship" where what is given by the men of many will be the gifts that we accept with a price.
The utility company - not worthy of local investment
A full study of the cloud computing and grid technologies along with mobile technologies would reveal the direction of utility. Companies such as Google, Apple, Microsoft and EMC, Amazon, has already made their investment into their platforms, reselling their services at very affordable rates to individuals, small business and enterprise organisations compounded with High quality levels of service.
These companies have set their directions into the world -into persons lives, homes, cars, and business places.
The once open Internet will be soon controlled by International laws. The freedom to share (AKA Pirate) will become difficult, pushing governments, small organisations and homes to legally obtain software with a price.
If open source concepts are not used within business sectors, governmental agencies and even by individuals then there will certainly be very tight relationship between large vendors, for costly and licences software.
The essence of open source as used in this document stands on the ground with respect to ownership of software or certain parts of the software, allowing used to decide as to how much they are willing to pay.
Notice open source is not free software, it is the concept of giving users ability to spend what they can afford and work with what they have.
The tie of utility and internet laws will soon reveal a cost to end users in small states that may be too high to afford certain luxury of the World of technology. However, this certainly opens the avenue to embrace the dimension of development and ownership certain niches that are specific to our culture and ways of life.
Thursday, February 9, 2012
Delete The Duplicated Entries in SQL Servers
This is an article from MS.
http://support.microsoft.com/kb/139444
It explains the deleting of records when they are fully duplicated in the database.
Regards
http://support.microsoft.com/kb/139444
It explains the deleting of records when they are fully duplicated in the database.
Regards
Refining the Process - Set up before Touching SQL
1. Make your own copy of the Original Database - yes, you own copy.
Best backup the file.
Then detach or disconnect SQL Services.
Take a copy of both .log file and the database.
Make a copy for your own use and make a copy for the vault.
Leave the original on the server.
Never touch the - Just back it up and work with copies of the this.
2. Take some steps. I do this. I will select and make tables for each parish eg, 40 i take all the records from the big data table and make my tbl40 dumping all the records from the big table into this.
So we do this for all the parishes.
This allows us to work with subsets of the data, allowing control and - just in case you make a bad "UPDATE" or "DELETE" then you just have to worry about only these subsets.
Lets us say you did this:
Then you would be in a really big mess, because there is no WHERE Clause and this means you have update all the record with the same values.
However if this was a subset, you can always say - oh well! this was just one set, let me start with a fresh copy - from the backup.
Best backup the file.
Then detach or disconnect SQL Services.
Take a copy of both .log file and the database.
Make a copy for your own use and make a copy for the vault.
Leave the original on the server.
Never touch the - Just back it up and work with copies of the this.
2. Take some steps. I do this. I will select and make tables for each parish eg, 40 i take all the records from the big data table and make my tbl40 dumping all the records from the big table into this.
SQL is called SELECT INTO tbl40 FROM Bigtable where ParishID=40This sql statement will automatically create a new table (tbl40) with all fields and structure of the "bigtable"
So we do this for all the parishes.
This allows us to work with subsets of the data, allowing control and - just in case you make a bad "UPDATE" or "DELETE" then you just have to worry about only these subsets.
Lets us say you did this:
Update Bigtable Set ParishID='090', Name='john'
Then you would be in a really big mess, because there is no WHERE Clause and this means you have update all the record with the same values.
However if this was a subset, you can always say - oh well! this was just one set, let me start with a fresh copy - from the backup.
Subscribe to:
Comments (Atom)
