Search Results

Search found 1863 results on 75 pages for 'populate'.

Page 1/75 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Cannot populate form with ajax and populate jquery plugin

    - by Azriel_
    I'm trying to populate a form with jquery's populate plugin, but using $.ajax The idea is to retrieve data from my database according to the id in the links (ex of link: get_result_edit.php?id=34), reformulate it to json, return it to my page and fill up the form up with the populate plugin. But somehow i cannot get it to work. Any ideas: here's the code: $('a').click(function(){ $('#updatediv').hide('slow'); $.ajax({ type: "GET", url: "get_result_edit.php", success: function(data) { var $response=$(data); $('#form1').populate($response); } }); $('#updatediv').fadeIn('slow'); return false; whilst the php file states as follow: <?php $conn = new mysqli('localhost', 'XXXX', 'XXXXX', 'XXXXX'); @$query = 'Select * FROM news WHERE id ="'.$_GET['id'].'"'; $stmt = $conn->query($query) or die ($mysql->error()); if ($stmt) { $results = $stmt->fetch_object(); // get database data $json = json_encode($results); // convert to JSON format echo $json; } ?> Now first thing is that the mysql returns a null in this way: is there something wrong with he declaration of the sql statement in the $_GET part? Second is that even if i put a specific record to bring up, populate doesn't populate. Update: I changed the populate library with the one called "PHP jQuery helper functions" and the difference is that finally it says something. finally i get an error saying NO SUCH ELEMENT AS i wen into the library to have a look and up comes the following function function populateFormElement(form, name, value) { // check that the named element exists in the form var name = name; // handle non-php naming var element = form[name]; if(element == undefined) { debug('No such element as ' + name); return false; } // debug options if(options.debug) { _populate.elements.push(element); } } Now looking at it one can see that it should print out also the name, but its not printing it out. so i'm guessing that retrieving the name form the json is not working correctly. Link is at http://www.ocdmonline.org/michael/edit%5Fnews.php with username: Testing and pass:test123 Any ideas?

    Read the article

  • Zend: How to populate data to checkboxes?

    - by NAVEED
    I am working on zend. I have a form with some checkboxes. I want to get data from database and populate this data to this form. If '1' is stored in table field then tick the check box otherwise leave it alone. In textboxes and dropdowns, data is easily populated but how to check a checkbox in action. I am creating checkboxes and textboxes elements like this in form.php: // Person name $person = $this->CreateElement('text', 'name'); $person->setLabel('Name'); $elements[] = $person; // Organization name $person = $this->CreateElement('text', 'organization'); $person->setLabel('Organization'); $elements[] = $person; // isAdmin Checkbox $isAdmin = $this->CreateElement('checkbox', 'isAdmin'); $isAdmin->setLabel('Admin'); $elements[] = $isAdmin; $this->addElements($elements); $this->setElementDecorators(array('ViewHelper')); // set form decorator (what script will render the form) $this->setDecorators(array(array('ViewScript' , array('viewScript' => 'organization/accessroles-form.phtml')))); And populating data like this (for example): // Prepare data to populate $data['name'] = 'Naveed'; $data['organization'] = 'ABC'; $data['isAdmin'] = '1'; // Populate editable data $this->view->form->populate( $data ); It is populating data in textboxes but not checking the checkbox? Any idea that how to check a checkbox from action? Thanks

    Read the article

  • Rails: Accessing previous loop in Populator (rake db:populate)

    - by sscirrus
    I am populating my Rails database using populator, and I have a case where I would like to build a series of records where fields start_date and end_date follow seamlessly from each other (from today back into the past). Here is a sample of what I'm doing: Chain.populate 1 do |ch| ch.date_end = DateTime.now ch.date_start = DateTime.civil(DateTime.now.year-rand(40)-1, rand(12)+1, rand(31)+1) end Chain.populate 0..10 do |chs| chs.date_end = Chain.find(:last).date_start chs.date_start = DateTime.civil(chs.date_end.year-rand(10)-1, rand(12)+1, rand(31)+1) end Problem? undefined method 'date_start' for nil:NilClass. I assume the problem is the first Chain record hasn't been saved, so I added: Chain.save # in between the two loops This didn't work either. How can I make this work? Thank you!

    Read the article

  • Populate a jTable Using MySQL

    - by Nathan Campos
    I have a project with a jTable called AchTable, that is like this: +-------+------+ | File | Type | +-------+------+ | | | | | | | | | +--------------+ And I have a mySQL table that is like the same, then I want to know how could I populate the jTable.

    Read the article

  • jQuery to populate form fields based on first entered value where number of fields is unknown

    - by da5id
    Greetings, I have a form with a variable number of inputs, a simplified version of which looks like this: <form> <label for="same">all the same as first?</label> <input id="same" name="same" type="checkbox" /> <input type="text" id="foo[1]" name="foo[1]" value="" /> <input type="text" id="foo[2]" name="foo[2]" value="" /> <input type="text" id="foo[3]" name="foo[3]" value="" /> <input type="text" id="foo[4]" name="foo[4]" value="" /> <input type="text" id="foo[5]" name="foo[5]" value="" /> </form> The idea is to tick the #same checkbox and have jQuery copy the value from #foo[1] into #foo[2], #foo[3], etc. They also need to clear if #same is unchecked. There can be any number of #foo inputs, based upon input from a previous stage of the form, and this bit is giving me trouble. I'm sure I'm missing something obvious, but I can't get any variation on $('#dest').val($('#source').val()); to work. Help!

    Read the article

  • How to Obtain Data to Pre-Populate Forms.

    - by Stan
    The objective is to have a form reflect user's defined constraints on a search. At first, I relied entirely upon server-side scripting to achieve this; recently I tried to shift the functionality to JavaScript. On the server side, the search parameters are stored in a ColdFusion struct which makes it particularly convenient to have the data JSON'ed and sent to the client. Then it's just a matter of separately iterating over 'checkable' and text fields to reflect the user's search parameters; jQuery proved to be exceptionally effective in simplifying the workload. One observable difference lies in performance. The second method appeared to be somewhat slower and didn't work in IE8. Evidently, the returned JSON'ed struct was seen as an empty object. I'm sure it can be fixed, though before spending any more time with it, I'm curious to hear how others would approach the task. I'd gladly appreciate any suggestions. --Stan

    Read the article

  • jQuery plugin question - populate select options with JSON data

    - by user331884
    I'm trying to fill selects with json data from a web service. I'm getting error 'Object doesn't support this property or method.' when I do this $(this).html(options.join'')); Any ideas what I'm doing wrong? ;(function($) { $.fillSelect = {}; $.fn.fillSelect = function(url, map) { var jsonpUrl = url + "?callback=?"; $.getJSON(jsonpUrl, function(d) { var options = []; var txt = map[0]; var val = map[1]; options.push('<option>--Select--</option>'); $.each(d, function(index, item) { options.push('<option value="' + item[val] + '">' + item[txt] + '</option>'); }); $(this).html(options.join('')); //getting error Object doesn't support this property or method } }; })(jQuery);

    Read the article

  • jQuery to populate array-named form fields based on first entered value where number of fields is un

    - by da5id
    Greetings, I have a form with a variable number of inputs, a simplified version of which looks like this: <form> <label for="same">all the same as first?</label> <input id="same" name="same" type="checkbox" /> <input type="text" id="foo[1]" name="foo[1]" value="" /> <input type="text" id="foo[2]" name="foo[2]" value="" /> <input type="text" id="foo[3]" name="foo[3]" value="" /> <input type="text" id="foo[4]" name="foo[4]" value="" /> <input type="text" id="foo[5]" name="foo[5]" value="" /> </form> The idea is to tick the #same checkbox and have jQuery copy the value from #foo[1] into #foo[2], #foo[3], etc. They also need to clear if #same is unchecked. There can be any number of #foo inputs, based upon input from a previous stage of the form, and this bit is giving me trouble. I'm sure I'm missing something obvious, but I can't get any variation on $('#dest').val($('#source').val()); to work. Help!

    Read the article

  • How-to populate different select list content per table row

    - by frank.nimphius
    Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} A frequent requirement posted on the OTN forum is to render cells of a table column using instances of af:selectOneChoices with each af:selectOneChoice instance showing different list values. To implement this use case, the select list of the table column is populated dynamically from a managed bean for each row. The table's current rendered row object is accessible in the managed bean using the #{row} expression, where "row" is the value added to the table's var property. <af:table var="row">   ...   <af:column ...>     <af:selectOneChoice ...>         <f:selectItems value="#{browseBean.items}"/>     </af:selectOneChoice>   </af:column </af:table> The browseBean managed bean referenced in the code snippet above has a setItems and getItems method defined that is accessible from EL using the #{browseBean.items} expression. When the table renders, then the var property variable - the #{row} reference - is filled with the data object displayed in the current rendered table row. The managed bean getItems method returns a List<SelectItem>, which is the model format expected by the f:selectItems tag to populate the af:selectOneChoice list. public void setItems(ArrayList<SelectItem> items) {} //this method is executed for each table row public ArrayList<SelectItem> getItems() {   FacesContext fctx = FacesContext.getCurrentInstance();   ELContext elctx = fctx.getELContext();   ExpressionFactory efactory =          fctx.getApplication().getExpressionFactory();          ValueExpression ve =          efactory.createValueExpression(elctx, "#{row}", Object.class);      Row rw = (Row) ve.getValue(elctx);         //use one of the row attributes to determine which list to query and   //show in the current af:selectOneChoice list  // ...  ArrayList<SelectItem> alsi = new ArrayList<SelectItem>();  for( ... ){      SelectItem item = new SelectItem();        item.setLabel(...);        item.setValue(...);        alsi.add(item);   }   return alsi;} For better performance, the ADF Faces table stamps it data rows. Stamping means that the cell renderer component - af:selectOneChoice in this example - is instantiated once for the column and then repeatedly used to display the cell data for individual table rows. This however means that you cannot refresh a single select one choice component in a table to change its list values. Instead the whole table needs to be refreshed, rerunning the managed bean list query. Be aware that having individual list values per table row is an expensive operation that should be used only on small tables for Business Services with low latency data fetching (e.g. ADF Business Components and EJB) and with server side caching strategies for the queried data (e.g. storing queried list data in a managed bean in session scope).

    Read the article

  • how to populate a value in some element using zend_form

    - by user1400
    i have some fields in my table,and a phone field , i save filed like this in this filed 111-222-5555 now i want to all of my fields , and populate in my form , i want populate phone in 3 elements when i try to this code $id = $this->_request->getParam ( 'id' ); $values = $cutomModel->findCustomerById($id);// return array of row $frm->populate($values); all fields show in form except phone field , how can i populate phone field in 3 elements thanks

    Read the article

  • Populate a WCF syndication podcast using MP3 ID3 metadata tags

    - by brian_ritchie
    In the last post, I showed how to create a podcast using WCF syndication.  A podcast is an RSS feed containing a list of audio files to which users can subscribe.  The podcast not only contains links to the audio files, but also metadata about each episode.  A cool approach to building the feed is reading this metadata from the ID3 tags on the MP3 files used for the podcast. One library to do this is TagLib-Sharp.  Here is some sample code: .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: Consolas, "Courier New", Courier, Monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } 1: var taggedFile = TagLib.File.Create(f); 2: var fileInfo = new FileInfo(f); 3: var item = new iTunesPodcastItem() 4: { 5: title = taggedFile.Tag.Title, 6: size = fileInfo.Length, 7: url = feed.baseUrl + fileInfo.Name, 8: duration = taggedFile.Properties.Duration, 9: mediaType = feed.mediaType, 10: summary = taggedFile.Tag.Comment, 11: subTitle = taggedFile.Tag.FirstAlbumArtist, 12: id = fileInfo.Name 13: }; 14: if (!string.IsNullOrEmpty(taggedFile.Tag.Album)) 15: item.publishedDate = DateTimeOffset.Parse(taggedFile.Tag.Album); This reads the ID3 tags into an object for later use in creating the syndication feed.  When the MP3 is created, these tags are set...or they can be set after the fact using the Properties dialog in Windows Explorer.  The only "hack" is that there isn't an easily accessible tag for "subtitle" or "published date" so I used other tags in this example. Feel free to change this to meet your purposes.  You could remove the subtitle & use the file modified data for example. That takes care of the episodes, for the feed level settings we'll load those from an XML file: .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: Consolas, "Courier New", Courier, Monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } 1: <?xml version="1.0" encoding="utf-8" ?> 2: <iTunesPodcastFeed 3: baseUrl ="" 4: title="" 5: subTitle="" 6: description="" 7: copyright="" 8: category="" 9: ownerName="" 10: ownerEmail="" 11: mediaType="audio/mp3" 12: mediaFiles="*.mp3" 13: imageUrl="" 14: link="" 15: /> Here is the full code put together. Read the feed XML file and deserialize it into an iTunesPodcastFeed classLoop over the files in a directory reading the ID3 tags from the audio files .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: Consolas, "Courier New", Courier, Monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } 1: public static iTunesPodcastFeed CreateFeedFromFiles(string podcastDirectory, string podcastFeedFile) 2: { 3: XmlSerializer serializer = new XmlSerializer(typeof(iTunesPodcastFeed)); 4: iTunesPodcastFeed feed; 5: using (var fs = File.OpenRead(Path.Combine(podcastDirectory, podcastFeedFile))) 6: { 7: feed = (iTunesPodcastFeed)serializer.Deserialize(fs); 8: } 9: foreach (var f in Directory.GetFiles(podcastDirectory, feed.mediaFiles)) 10: { 11: try 12: { 13: var taggedFile = TagLib.File.Create(f); 14: var fileInfo = new FileInfo(f); 15: var item = new iTunesPodcastItem() 16: { 17: title = taggedFile.Tag.Title, 18: size = fileInfo.Length, 19: url = feed.baseUrl + fileInfo.Name, 20: duration = taggedFile.Properties.Duration, 21: mediaType = feed.mediaType, 22: summary = taggedFile.Tag.Comment, 23: subTitle = taggedFile.Tag.FirstAlbumArtist, 24: id = fileInfo.Name 25: }; 26: if (!string.IsNullOrEmpty(taggedFile.Tag.Album)) 27: item.publishedDate = DateTimeOffset.Parse(taggedFile.Tag.Album); 28: feed.Items.Add(item); 29: } 30: catch 31: { 32: // ignore files that can't be accessed successfully 33: } 34: } 35: return feed; 36: } Usually putting a "try...catch" like this is bad, but in this case I'm just skipping over files that are locked while they are being uploaded to the web site.Here is the code from the last couple of posts.  

    Read the article

  • Pre-Populate the AppFabric Cache

    When I start talking to people about the caching functionality that is part of Windows Server AppFabric I am usually asked "What is the AppFabric Cache?"  The MSDN page at http://msdn.microsoft.com/en-us/library/ee790954.aspx provides a great overview (below) as well as additional information.  The Cache is defined as: "Windows Server AppFabric caching features use a cluster of servers that communicate with each other to form a single, unified application cache system. As a distributed...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Shows how to use AutocompleteExtender to populate subjects and databind quotations via Entity Framew

    This article will focus on a database of famous quotations that I"ve pared down to a downloadable size for a demo, and how to wire up the AJAX Toolkit autocomplete extender to a textbox that is used to typeahead a Subject. When the ClientItemSelected event fires, the Display button Click is invoked, and this causes an EF query to display the matching quotes in a DataList.  read moreBy Peter BrombergDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Shows how to use AutocompleteExtender to populate subjects and databind quotations via Entity Framew

    This article will focus on a database of famous quotations that I"ve pared down to a downloadable size for a demo, and how to wire up the AJAX Toolkit autocomplete extender to a textbox that is used to typeahead a Subject. When the ClientItemSelected event fires, the Display button Click is invoked, and this causes an EF query to display the matching quotes in a DataList.  read moreBy Peter BrombergDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Using Three Flavors of LINQ To Populate a TreeView

    LINQ is a valuable technology. LINQ to XML, LINQ to Objects and LINQ to XSD, in particular, can save valuable time for developers and produce more maintainable code. Michael describes how he used three different flavours of LINQ to map XML to a Treeview component that he used in the QueryPicker control that was the subject of a two-part article here on Simple-Talk.

    Read the article

  • How to populate a form list with buttons using javascript

    - by StealingMana
    I made a script that, when you press one button(accessories) the selection(mylist) populates with one array(accessoryData), and when you hit the other button(weapons) the other array(weaponData) populates the selection. However, in the current state of the code the second button press is not re-populating the selection. What is wrong here? Also if there is a more efficient way to do this, that might be helpful. Full code function runList(form, test) { var html = ""; var x; dataType(test); while (x < dataType.length) { html += "<option>" + dataType[x]; x++; } document.getElementById("mylist").innerHTML = html; }

    Read the article

  • Populate InfoPath Combo Box

    - by fwm
    I am trying to populate a drop down and found this page, which provides part of the solution: http://www.bizsupportonline.net/infopath2007/programmatically-fill-populate-drop-down-list-box-infopath-2007.htm I got this to work, but if players.xml was changed, the drop down list didn't reflect it. I had to rename the file and add the new file as my secondary data source to see the change. For my purposes, the xml file that is used to populate the drop down box would need to be created anew. Each time the form is loaded, I programatically create a new xml file, but the drop down doesn't pick up the new file, even though I have named it as the secondary data source. It seems that once you set a file to be your secondary data source, it takes a snapshot of that file at the time the source was added as a secondary data source and if you change the file, you must rename and add it as your secondary source. How do I populate a drop down box from an XML file such that if the XML file changes, the contents of the drop down change accordingly?

    Read the article

  • Populate tableView with more than one array

    - by Ewoods
    The short version: Is there a way to populate one specific row in a tableView with one value from one array, then populate another row in that same tableView with one value from a different array? For example, cell 1 would have the first value from Array A, cell 2 would have the first value from Array B, cell 3 would have the first value from Array C, etc. The long version: I hope this isn't too confusing. I've got an array of names, and then three more arrays with actions associated with those people. For example, the names array has Jim, Bob, and Sue, and then there's an array for eating, reading, and sleeping that records every time each person does one of these things (all of these arrays are populated from a MySQL database). The names array is used to populate a root tableView. Tapping on one of the names brings up a detail view controller that has another tableView that only has three rows. This part is all working fine. What I want to happen is when I tap on a name, it moves to the detail view and the three cells would then show the last event for that person for each of the three activities. Tapping on one of those three events then moves to a new view controller with a tableView that shows every event for that category. For example, if I tapped on Bob, the second page would show the last time Bob ate, read, and slept. Tapping on the first row would bring up a table that showed every time Bob has eaten. So far I've only been able to populate the second tableView with all of the rows from one of the arrays. I need it the other way around (one row from all of the arrays).

    Read the article

  • Auto populate Outlook with other users' calendars

    - by bduncanj
    In Outlook 2007, when in Calendar view, there's a category (group) of calendars on the left hand bar titled "People's Calendars". We're migrating from a system where all employees have access to read and write to all other employees' calendars (via a 3rd party Web Calendar). Is it possible, from an admin level, to auto-populate this People's Calendars category in everyone's Outlook with all the employees in the company, and grant everyone read / write access to everyone else's calendars? (Running Exchange 2010) Thanks, Duncan

    Read the article

  • How to create a database and populate it during setup

    - by Philippe
    I would like to find a way to create and populate a database during asp.net setup. So, what I'm willing to do is: Create the database during the setup Populate the database with some initial data (country codes or something like that) Create the appropriate connection string in the configuration file I'm using .NET 3.5 and Visual Studio 2005, and the Database is SQL Server 2005. Thanks in advance.

    Read the article

  • How to populate a generic list of objects in C# from SQL database

    - by developr
    I am just learning ASP.NET c# and trying to incorporate best practices into my applications. Everything that I read says to layer my applications into DAL, BLL, UI, etc based on separation of concerns. Instead of passing datatables around, I am thinking about using custom objects so that I am loosely coupled to my data layer and can take advantage of intellisense in VS. I assume these objects would be considered DTOs? First, where do these objects reside in my layers? BLL, DAL, other? Second, when populating from SQL, should I loop through a data reader to populate the list or first fill a data table, then loop through the table to populate the list? I know you should close the database connection as soon as possible, but it seems like even more overhead to populate the data table and then loop through that for the list. Third, everything I see these days says use Linq2SQL. I am planning to learn Linq2SQL, but at this time I am working with a legacy database that doesn't have foreign keys setup and I do not have the ability to fix it atm. Also, I want to learn more about c# before I start getting into ORM solutions like nHibernate. At the same time I don't want to type out all the connection and SQL plumbing for every query. Is it ok to use the Enterprise DAAB for now?

    Read the article

  • Populate a form from SQL

    - by xrum
    Hi, I am trying to populate a web from from a SQL table. This is what I have right now, though I am not sure if it's the best way to do things, please give me suggestions: Public Class userDetails Public address1 As String Public address2 As String Public city As String ... ... ... End Class Public Class clsPerson 'set SQL connection Dim objFormat As New clsFormat Dim objConn As New clsConn() Dim connStr As String = objConn.getConn() Dim myConnection As New Data.SqlClient.SqlConnection(connStr) Public Function GetPersonDetails() As userDetails 'connection and all other good stuff here Try ' Execute the command myConnection.Open() dr = myCommand.ExecuteReader() ' Make sure a record was returned If dr.Read() Then ' Create and Populate ApplicantDetails userDetails.address1 = dr("address1") userDetails.address2 = objFormat.CheckNull(dr("address2")) userDetails.city = objFormat.CheckNull(dr("city")) .... Else Err.Raise(4938, "clsUser", "Error in GetUserDetails - User Not Found") End If dr.Close() Finally myConnection.Close() End Try Return userDetails End Function i then use GetPersonDetails() function in my backend to populate the form. like so: Dim userDetails as new userDetails userdetails = getPersonDetails() txtAddress.text = userdetails.address1 etc.... however, there are like 50 fields in the User db, and it seems like a lot of retyping... please help me find a better way to do this. Thank you!

    Read the article

  • Populate Android Database From CSV file?

    - by MoMo
    Is it possible to take a csv file stored in the res/raw resource directory and use it to populate a table in the sqlite3 database? My thought was that, if there was a way to do a bulk import for the entire file into the table then that would be cleaner and faster than iterating over each line in the file and executing individual insert statements... I've found that there is a sqlite import command that allows this: http://stackoverflow.com/questions/1045910/how-can-i-import-load-a-sql-or-csv-file-into-sqlite ...but I'm having trouble applying those statements in my Android application. My first thought was to try something like the following...but no luck: db.execSQL("CREATE TABLE " + TABLE_NAME + "(id INTEGER PRIMARY KEY, name TEXT)"); db.execSQL(".mode csv"); db.execSQL(".import res/raw/MyFile.csv " + TABLE_NAME); Is this possible? Should I be trying a different approach to populate my database? Thanks for you answers!

    Read the article

  • Use SSIS to populate Excel workbook generated using OOXML

    - by Maulik
    We are trying to generate MS Excel workbook using OOXML and populate data using SSIS. We are able to generate Workbook and sheets, also able to create columns and insert data in Header cell. We can also populate data using SSIS. But the Sheet (DocumentFormat.OpenXml.Spreadsheet.Sheet) and all cells (DocumentFormat.OpenXml.Spreadsheet.Cell) becomes OpenXmlUnknownElement. So we are not able to read sheet / cell using following Code. Sheet sheet = workbookPart.Workbook.Descendants().Where(s = s.Name == "Sheet1").SingleOrDefault(); We are able to read the same file if we first open it using MS Excel and save.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >