Search Results

Search found 27 results on 2 pages for 'kundan chaudhary'.

Page 2/2 | < Previous Page | 1 2 

  • How to set and get the id for the items in the spinner in Android

    - by Haresh Chaudhary
    I have a problem in my project that i am displaying a activity which would contain the details of the project which is previously added in Project Management System.. Now the fields in it are like: Fields of the Activity Name Of Project: ABC(EditText) Name Of Developer : ________(Spinner) Deadline : ________(Date Picker) Created On : _______(TextView) . . Now, the Spinner contains the Names of all developers working in the Company..I have used the ArrayAdapter with a array having the names of all the developers which is fetched from the database.. The problem is that when i update the Name Of Developer field, i get Only the Name of the Developer which is not enough to update the data as their can be multiple developers with the same name in the Company..So now I require the id of the developers to update it.. How to store that id of the developers with the Spinner so that i can achieve this.. Please help me to sort this out. Actually what i want to do like is as that we do in html:: <select> <option id="1">Developer1</option> <option id="2">Developer2</option> <option id="3">Developer2</option> <option id="4">Developer2</option> </select> where the id attached would be the database id....I want to imitate this in our android.... This the code that i have used to store the names in the array:: String alldevelopers = null; try { ArrayList<NameValuePair> postP = new ArrayList<NameValuePair>(); alldevelopers = CustomHttpClient.executeHttpPost( "/fetchdevelopers.php", postP); String respcl = alldevelopers.toString(); alldevelopersParser dev = new alldevelopersParser(); ow = dev.parseByDOM(respcl); } catch (Exception e) { e.printStackTrace(); } String developers[] = new String[ow.length]; //dev is a class object for (int n = 0; n < ow.length; n++) { developers[n] = ow.developer[n][2]; } This is the Spinner that would spin the array.. final Spinner devl = (Spinner) findViewById(R.id.towner); devl.setOnItemSelectedListener(managetasks.this); ArrayAdapter<String> b = new ArrayAdapter<String>getApplicationContext(), android.R.layout.simple_spinner_item,developers); b.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line); devl.setAdapter(b);

    Read the article

  • VSDB to SSDT part 4 : Redistributable database deployment package with SqlPackage.exe

    - by Etienne Giust
    The goal here is to use SSDT SqlPackage to deploy the output of a Visual Studio 2012 Database project… a bit in the same fashion that was detailed here : http://geekswithblogs.net/80n/archive/2012/09/12/vsdb-to-ssdt-part-3--command-line-deployment-with-sqlpackage.exe.aspx   The difference is we want to do it on an environment where Visual Studio 2012 and SSDT are not installed. This might be the case of your Production server.   Package structure So, to get started you need to create a folder named “DeploymentSSDTRedistributable”. This folder will have the following structure :         The dacpac and dll files are the outputs of your Visual Studio 2012 Database project. If your database project references another database project, you need to put their dacpac and dll here too, otherwise deployment will not work. The publish.xml file is the publish configuration suitable for your target environment. It holds connexion strings, SQLVARS parameters and deployment options. Review it carefully. The SqlDacRuntime folder (an arbitrary chosen name) will hold the SqlPackage executable and supporting libraries   Contents of the SqlDacRuntime folder Here is what you need to put in the SqlDacRuntime folder  :      You will be able to find these files in the following locations, on a machine with Visual Studio 2012 Ultimate installed : C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin : SqlPackage.exe Microsoft.Data.Tools.Schema.Sql.dll  Microsoft.Data.Tools.Utilities.dll Microsoft.SqlServer.Dac.dll C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.TransactSql.ScriptDom\v4.0_11.0.0.0__89845dcd8080cc91 Microsoft.SqlServer.TransactSql.ScriptDom.dll   Deploying   Now take your DeploymentSSDTRedistributable deployment package to your remote machine. In a standard command window, place yourself inside the DeploymentSSDTRedistributable  folder.   You can first perform a check of what will be updated in the target database. The DeployReport task of SqlPackage.exe will help you do that. The following command will output an xml of the changes:   "SqlDacRuntime/SqlPackage.exe" /Action:DeployReport /SourceFile:./Our.Database.dacpac /Profile:./Release.publish.xml /OutputPath:./ChangesToDeploy.xml      You might get some warnings on Log and Data file like I did. You can ignore them. Also, the tool is warning about data loss when removing a column from a table. By default, the publish.xml options will prevent you from deploying when data loss is occuring (see the BlockOnPossibleDataLoss inside the publish.xml file). Before actual deployment, take time to carefully review the changes to be applied in the ChangesToDeploy.xml file.    When you are satisfied, you can deploy your changes with the following command : "SqlDacRuntime/SqlPackage.exe" /Action:Publish /SourceFile:./Our.Database.dacpac /Profile:./Release.publish.xml   Et voilà !  Your dacpac file has been deployed to your database. I’ve been testing this on a SQL 2008 Server (not R2) but it should work on 2005, 2008 R2 and 2012 as well.   Many thanks to Anuj Chaudhary for his article on the subject : http://www.anujchaudhary.com/2012/08/sqlpackageexe-automating-ssdt-deployment.html

    Read the article

< Previous Page | 1 2