Search Results

Search found 10177 results on 408 pages for 'thumbs db'.

Page 109/408 | < Previous Page | 105 106 107 108 109 110 111 112 113 114 115 116  | Next Page >

  • Insert data into SQL server with best performance

    - by Incognito
    I have an application which intensively uses DB (SQL Server). As it must have high performance I would like to know the fastest way to insert record into DB.Fastest from the standpoint of execution time. What should I use ? As I know the fastest way is to create stored procedure and to call it from code (ADO.NET). Please let me know is there any better way or may be there are is some other practices to increase performance.

    Read the article

  • How to set up global connect to datebase in pylons(python), sqlalchemy.

    - by gummmibear
    Hi! I just start lern python, pylons. i have problem with setting up datebase connection. i won't to set connection, where i can see this connection in all my controllers. Now i use: some thing like this in my controller: 45 ' db = create_engine('mysql://root:password@localhost/python') 46 ' metadata = MetaData(db) 47 48 ' email_list = Table('email',metadata,autoload=True) in development.ini i have: 44 sqlalchemy.url = mysql://root@password@localhost/python 45 sqlalchemy.pool_recycle = 3600 and now, pleas help me to set __init__.py

    Read the article

  • How to open .newb file (auto open)???

    - by u show me
    FIRSTLY apologies for english, embarased i am afghanistone i am team america no worrie u had large program that store not only config but a bunch other project relation settings in SQLite db. how can I save the db as project.newb file extension and thencan auto open in my porgram??? need INstaller setting?? How do i detect when this has happened, user open .newb file, happen in Qt, so i can load project? PLEASE HELP i fear family life if unable completed

    Read the article

  • How can I edit an entity in MVC4 with EF5 which has a unique constraint?

    - by Yoeri
    [HttpPost] public ActionResult Edit(Car car) { if (ModelState.IsValid) { db.Entry(car).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(car); } This is a controller method scaffolded by MCV 4 My "car" entity has a unique field: LicensePlate. I have custom validation on my Entity: Validation: public partial class Car { partial void ValidateObject(ref List<ValidationResult> validationResults) { using (var db = new GarageIncEntities()) { if (db.Cars.Any(c => c.LicensePlate.Equals(this.LicensePlate))) { validationResults.Add( new ValidationResult("This licenseplate already exists.", new string[]{"LicensePlate"})); } } } } should it be usefull, my car entity: public partial class Car:IValidatableObject { public int Id { get; set; } public string Color { get; set; } public int Weight { get; set; } public decimal Price { get; set; } public string LicensePlate { get; set; } public System.DateTime DateOfSale { get; set; } public int Type_Id { get; set; } public int Fuel_Id { get; set; } public virtual CarType Type { get; set; } public virtual Fuel Fuel { get; set; } public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) { var result = new List<ValidationResult>(); ValidateObject(ref result); return result; } partial void ValidateObject(ref List<ValidationResult> validationResults); } QUESTION: Everytime I edit a car, it raises an error: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details. The error is the one raised by my validation, saying it can't edit because there is already a car with that license plate. If anyone could point me in the right direction to fix this, that would be great! I searched but couldn't find anything, so even related posts are welcome!

    Read the article

  • How would I change this Query builder from Kohana 2.4 to Kohana 3?

    - by Thorpe Obazee
    I have had this website built for a few months and I am just getting on Kohana 3. I'd just like to convert this K2.4 query builder to K3 query builder. return DB::select(array('posts.id', 'posts.created', 'posts.uri', 'posts.price', 'posts.description', 'posts.title', 'image_count' => db::expr('COUNT(images.id)'))) ->from('posts') ->join('images')->on('images.post_id', '=', 'posts.id') ->group_by(array('posts.id')) ->order_by('posts.id', 'DESC') ->limit($limit) ->offset($offset) ->execute();

    Read the article

  • Render similar data in C# by grouping

    - by Ted
    I am trying to create some dynamic html out of some data from db. My data returned from db is: ApplicationName URL AppName1 URL1 AppName2 URL1 AppName2 URL2 AppName1 URL2 I want that all URL's for a single application should be rendered under one heading of ApplicationName. Like: AppName1 URL1 URL2 AppName2 URL1 URL2 Can anyone help me in the code for this?

    Read the article

  • finding process bottlenecks rails/ruby

    - by Ben
    I just got started with rails, and when I testing in development mode, I see in the logs that my Mailer action is taking 1175ms. Is there anyway to find out what exactly is the slow step? Also, there is a line that says (View:2, DB:1). I assume the DB means number of database lookups, but what about the view?

    Read the article

  • Many returned records cause stackoverflow with Hibernate

    - by mimi law
    If there are many return records from DB. It will get stackoverflow problem. User is a class, which has a one to many relationship (to 3 other classes). When I print out the SQL, i found that the system runs the same query many time to get the data from DB. Does anyone know what the problem is? result.addAll(getCurrentSession().createCriteria(User.class) .add(Restrictions.ilike("name", "tom", MatchMode.ANYWHERE)) .setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY) .list());

    Read the article

  • Which memory related Tomcat JVM startup parameters are worth tuning?

    - by knorv
    I'm trying to understand the fine art of tuning Tomcat memory settings. In this quest I have the following three questions: Which memory related JVM startup parameters are worth setting when running Tomcat? Why? What are useful rule-of-thumbs when fine-tuning the memory settings for a Tomcat installation? How do you monitor the memory consumption of your live Tomcat installation?

    Read the article

  • overwrite existing entity via bulkloader.Loader

    - by Ray Yun
    I was going to CSV based export/import for large data with app engine. My idea was just simple. First column of CSV would be key of entity. If it's not empty, that row means existing entity and should overwrite old one. Else, that row is new entity and should create new one. I could export key of entity by adding key property. class FrontExporter(bulkloader.Exporter): def __init__(self): bulkloader.Exporter.__init__(self, 'Front', [ ('__key__', str, None), ('name', str, None), ]) But when I was trying to upload CSV, it had failed because bulkloader.Loader.generate_key() was just for "key_name" not "key" itself. That means all exported entities in CSV should have unique 'key_name' if I want to modify-and-reupload them. class FrontLoader(bulkloader.Loader): def __init__(self): bulkloader.Loader.__init__(self, 'Front', [ ('_UNUSED', lambda x: None), ('name', lambda x: x.decode('utf-8')), ]) def generate_key(self,i,values): # first column is key keystr = values[0] if len(keystr)==0: return None return keystr I also tried to load key directly without using generate_key(), but both failed. class FrontLoader(bulkloader.Loader): def __init__(self): bulkloader.Loader.__init__(self, 'Front', [ ('Key', db.Key), # not working. just create new one. ('__key__', db.Key), # same... So, how can I overwrite existing entity which has no 'key_name'? It would be horrible if I should give unique name to all entities..... From the first answer, I could handle this problem. :) def create_entity(self, values, key_name=None, parent=None): # if key_name is None: # print 'key_name is None' # else: # print 'key_name=<',key_name,'> : length=',len(key_name) Validate(values, (list, tuple)) assert len(values) == len(self._Loader__properties), ( 'Expected %d columns, found %d.' % (len(self._Loader__properties), len(values))) model_class = GetImplementationClass(self.kind) properties = { 'key_name': key_name, 'parent': parent, } for (name, converter), val in zip(self._Loader__properties, values): if converter is bool and val.lower() in ('0', 'false', 'no'): val = False properties[name] = converter(val) if key_name is None: entity = model_class(**properties) #print 'create new one' else: entity = model_class.get(key_name) for key, value in properties.items(): setattr(entity, key, value) #print 'overwrite old one' entities = self.handle_entity(entity) if entities: if not isinstance(entities, (list, tuple)): entities = [entities] for entity in entities: if not isinstance(entity, db.Model): raise TypeError('Expected a db.Model, received %s (a %s).' % (entity, entity.__class__)) return entities def generate_key(self,i,values): # first column is key if values[0] is None or values[0] in ('',' ','-','.'): return None return values[0]

    Read the article

  • SQL SERVER Project

    - by Saif Omari
    My Application Database Without Project and without Source safe, i planned to make my DB to be as project and add it to TFS, but I have no idea how to script the stored procedures, Triggers, Views, Functions, and what is the best practice to Make Update Script for All My stored procedures, Triggers, Views, and Functions to My customers DB.

    Read the article

  • iPhone SQLite connection in domain object - close each time?

    - by BahaiResearch.com
    I have what I would consider a small sized iPhone app that uses SQLite. There is a singleton domain object which gets data from a SQLite database. Is it better to create and open the SQLite connection for each request, or to open the DB once and hold on to it for the duration of the app. The app's reason for being is the domain object so other objects will not need the DB.

    Read the article

  • MongoDB: What's the point of using MapReduce without parallelism?

    - by netvope
    Quoting http://www.mongodb.org/display/DOCS/MapReduce#MapReduce-Parallelism As of right now, MapReduce jobs on a single mongod process are single threaded Without parallelism, what are the benefits of MapReduce compared to simpler or more traditional methods for queries and data aggregation? To avoid confusion: the question is NOT "what are the benefits of document-oriented DB over traditional relational DB"

    Read the article

  • JSONResult to String

    - by Dustin Laine
    I have a JsonResult that is working fine, and returning JSON from some POCO's. I want to save the JSON as a string in a DB. public JsonResult GetJSON() { JsonResult json = new JsonResult { Data = GetSomPocos() }; return json; } I need to audit the response, so I want to save the json into a DB. I am having trouble finding a way to get the JSON as a string. Any help is appreciated.

    Read the article

  • Why doesn't MongoDb store my slashes in this string?

    - by Rob Dudley
    Can anyone tell me why this command doesn't work from the MongoDB shell client: db.coll.update({'live':true},{$set:{'mask':"\D\D\D\D\D\D\D\D"}},false,true) but db.coll.findOne({'id':'someId'}) returns the mask field as: "mask" : "DDDDDDDD", Where are the slashes going? I've tried "double escaping" with \\D and that inserts both slashes: "mask" : "\\D\\D\\D\\D\\D\\D\\D\\D", MongoDB shell version: 2.0.6, MongoDB version: 2.0.5, OSX Lion Thanks

    Read the article

  • Is there any good (eazy, small) sample of working with google openid? (php)

    - by Ole Jak
    Is there any good (eazy to understend, small - not lotof code lines) sample of working with google openid? (php) - What I need is to see how to get users name from google openId ; a good way of how to integrate openid into my current users DB (tooday in DB I have table user with name and pass)? and how to get any Idea about if useris currently loged in from this computer with openId?

    Read the article

  • How to convert an application to be a database independent app ?

    - by Eslam
    I have a java web application that has informix DB as it's back end database , now i take a decision to make my app work with SqlServer so i changed all the informix related syntax into SqlServer, and i may take a decision in the future to switch into oracle so the pain will be repeated again and again, as a result i decided to make my application a DataBase independent one that's able to work with any DB vendor smoothly, but i have no idea till now about how to do that, so your ideas is welcomed.

    Read the article

< Previous Page | 105 106 107 108 109 110 111 112 113 114 115 116  | Next Page >