Search Results

Search found 7391 results on 296 pages for 'record locking'.

Page 150/296 | < Previous Page | 146 147 148 149 150 151 152 153 154 155 156 157  | Next Page >

  • Model a Zero or One to Many Relationship

    - by John
    How should I model a zero or one to a many relationship in the database? For example, a user record may or may not have a parent. So should my user table have a t_user.parent_id or should I have an associative table called t_user_hierarchy with the columns t_user_hierarchy.parent_id and t_user_hierarchy.user_id?

    Read the article

  • database text field databound to a checkbox

    - by Patrick
    I'd like the field to save as a 1 or 0 instead of 'True' or 'False' in the database and i cannot figure out how to do it without manually setting every property when the record is saved. I have to use this a lot in this project and a bit field is not an option. I would like to solve this issue by extending the CheckBox control if possible but i don't know how to change the binding fields value. Any help would be greatly appreciated!

    Read the article

  • Oracle query to select rows with unique code

    - by Jasim
    I have a table like this C1 C2 C3 Code 1 2 3 33 1 2 3 34 2 4 1 14 1 2 3 14 i want to select only those record whose code is appearing only in single row. ie, in this case rows with code 33 and 34.. as they appear only once in this table. How can i write a query for that

    Read the article

  • What to name 2 methods with same signatures

    - by coffeeaddict
    Initially I had a method in our DL that would take in the object it's updating like so: internal void UpdateCash(Cash Cash) { using (OurCustomDbConnection conn = CreateConnection("UpdateCash")) { conn.CommandText = @"update Cash set captureID = @captureID, ac_code = @acCode, captureDate = @captureDate, errmsg = @errorMessage, isDebit = @isDebit, SourceInfoID = @sourceInfoID, PayPalTransactionInfoID = @payPalTransactionInfoID, CreditCardTransactionInfoID = @CreditCardTransactionInfoID where id = @cashID"; conn.AddParam("@captureID", cash.CaptureID); conn.AddParam("@acCode", cash.ActionCode); conn.AddParam("@captureDate", cash.CaptureDate); conn.AddParam("@errorMessage", cash.ErrorMessage); conn.AddParam("@isDebit", cyberCash.IsDebit); conn.AddParam("@PayPalTransactionInfoID", cash.PayPalTransactionInfoID); conn.AddParam("@CreditCardTransactionInfoID", cash.CreditCardTransactionInfoID); conn.AddParam("@sourceInfoID", cash.SourceInfoID); conn.AddParam("@cashID", cash.Id); conn.ExecuteNonQuery(); } } My boss felt that creating an object every time just to update one or two fields is overkill. But I had a couple places in code using this. He recommended using just UpdateCash and sending in the ID for CAsh and field I want to update. Well the problem is I have 2 places in code using my original method. And those 2 places are updating 2 completely different fields in the Cash table. Before I was just able to get the existing Cash record and shove it into a Cash object, then update the properties I wanted to be updated in the DB, then send back the cash object to my method above. I need some advice on what to do here. I have 2 methods and they have the same signature. I'm not quite sure what to rename these because both are updating 2 completely different fields in the Cash table: internal void UpdateCash(int cashID, int paypalCaptureID) { using (OurCustomDbConnection conn = CreateConnection("UpdateCash")) { conn.CommandText = @"update Cash set CaptureID = @paypalCaptureID where id = @cashID"; conn.AddParam("@captureID", paypalCaptureID); conn.ExecuteNonQuery(); } } internal void UpdateCash(int cashID, int PayPalTransactionInfoID) { using (OurCustomDbConnection conn = CreateConnection("UpdateCash")) { conn.CommandText = @"update Cash set PaymentSourceID = @PayPalTransactionInfoID where id = @cashID"; conn.AddParam("@PayPalTransactionInfoID", PayPalTransactionInfoID); conn.ExecuteNonQuery(); } } So I thought hmm, maybe change the names to these so that they are now unique and somewhat explain what field its updating: UpdateCashOrderID UpdateCashTransactionInfoID ok but that's not really very good names. And I can't go too generic, for example: UpdateCashTransaction(int cashID, paypalTransactionID) What if we have different types of transactionIDs that the cash record holds besides just the paypalTransactionInfoID? such as the creditCardInfoID? Then what? Transaction doesn't tell me what kind. And furthermore what if you're updating 2 fields so you have 2 params next to the cashID param: UpdateCashTransaction(int cashID, paypalTransactionID, someOtherFieldIWantToUpdate) see my frustration? what's the best way to handle this is my boss doesn't like my first route?

    Read the article

  • php count rss entries since a specific date/time

    - by Steven
    can anyone tell me why this code don't work: $q = $_GET['q']; // Load and parse the XML document $rss = simplexml_load_file("http://search.twitter.com/search.atom?lang=en&q=$q&rpp=100&page=1"); $Count1 = 0; while(strtotime($rss->entry->published)>1270833600){ foreach ($rss->entry as $item) { $Count1++; } } print "Total Record: ".$Count1;

    Read the article

  • Live javascript debugging by recording function calls and parameters

    - by Jenko
    Is there a debugging system that allows me to record javascript function calls and their parameters as they occur? this would allow me to trace and debug applications in live/client situations without the performance hit due to manual logging. Edit: I'm not talking about manually calling functions using a 'console' window and viewing the results, or manually adding 'trace' or 'log' commands into my javascript. I need it to work with any running javascript.

    Read the article

  • Paperclip renaming files after they're saved

    - by fivetwentysix
    How do I rename a file after is has been uploaded and saved? My problem is that I need to parse information about the files automatically in order to come up with the file name the file should be saved as with my application, but I can't access the information required to generate the file name till the record for the model has been saved.

    Read the article

  • MySQL database query returns empty result

    - by user1791096
    I am doing a data migration and getting empty result of simple query with one join. Following is the query Select * from users u INNER JOIN temp_users tu ON tu.uid = u.uid There hundreds of records which have same uid in both tables, but this query returns only one record. Following is the structure of tables users table uid: varchar(50) utf8_general_ci Yes NULL temp_users table uid: varchar(50) utf8_general_ci Yes NULL Is there anyone who faced same problem?

    Read the article

  • Having issues with setting up Inbound Email in SP2010

    - by Bill Daugherty
    I am having issues with setting up the Inbound Email with SP 2010. I have enabled the settings in Central Admin for Inbound Email, set up an MX record, added the IP to my Exchange Server, then created a new doc-lib in SP and i am still not seeing the "Incoming e-mail settings" option under communications in the doc-lib setup screen. Can someone let me know what I may be doing wrong, or missing?

    Read the article

  • Silverlight 4 Datagrid Sorting

    - by DavyMac23
    I'm having a heck of a time trying to get a silverlight datagrid to properly sort, and do so quickly (sub 1/10 second). Here's the scenario: -WCF callback every 1/5 of a second -Take the callback, match up to the existing record in an ObservableCollection -Update the ObservableCollection's properties -Bind the grid. I've tried a linq query, PagedCollectionView, and observablecollection.select(), all are waaaaaaay too slow, and introduce 12+ second delays in processing. Anyone else experience this?

    Read the article

  • Implement Partial sorted query in sql server 2005

    - by Brij
    I have to show records in such a way that some selected records should come first. After this, another records come in sorted manner from the same table. For example, If I select state having stateID = 5 then the corresponding record should come first. after this another records should come in sorted manner. For this, I tried union but it shows all in sorted. select state from statemaster where stateid=5 union all select state from statemaster where not stateid =5 order by state Thanks

    Read the article

  • Authlogic Facebook find existing account

    - by pcasa
    Using Authlogic and Authlogic Facebook Connect. before_filter works great. Get name and facbook_uid saved in db. Only problem is that it saves a new record every time. Need help figuring out how to build some type of find_by_facebook_uid_or_create_user I have tried reading up on the API's for facebooker, but this is way over me. :( UPDATED - users_controller.rb def before_connect(facebook_session) self.firstname = facebook_session.user.first_name self.lastname = facebook_session.user.last_name self.persistence_token = reset_persistence_token end application_controller.rb before_filter :set_facebook_session helper_method :facebook_session

    Read the article

  • insert number of days of year, months, days of month

    - by ml
    How can I insert in a database the number of days of the year and at the same time insert in the same record the month, day of the month, and the day of the week? This is my table: tabela/coluna.Dias_ano(registo 1...365) Year:=StrToInt(ano.Text); diasano.Text:= IntToStr( DaysInAYear(Year) ); diasAno| Mes |diames |dia semana | 1 | janeiro | 1 |Segunda | 2 | janeiro | 2 | Terça | ... 365 | Dezembro | 31 | Segunda

    Read the article

  • MySQL VARCHAR strange column behavior

    - by Mat
    I have the following SQL statement which returns a single record as expected: select * from geodatasource_cities C, geodatasource_countries D where C.CC_FIPS = D.CC_FIPS and D.CC_ISO='AU' and UCASE(TRIM(C.FULL_NAME_ND)) LIKE '%JAN JUE%'; However, If I use the following SQL statement, no records are returned. I have only changed the LIKE clause to an equal to clause: select * from geodatasource_cities C, geodatasource_countries D where C.CC_FIPS = D.CC_FIPS and D.CC_ISO='AU' and UCASE(TRIM(C.FULL_NAME_ND)) = 'JAN JUE'; Can anybody please help me understand why this may be happening?

    Read the article

  • How do I see if something is getting touched?

    - by Nathan
    Is there some way in objective C to see if an instance is being touched such as: - (void)viewDidLoad { [super viewDidLoad]; if (recordButton.touched = YES) { NSLog (@"record button got touched"); } } Can't they just make these things easy? Could someone help?

    Read the article

  • What are the reasons *not* to use a GUID for a primary key?

    - by Yarin
    Whenever I design a database I automatically start with an auto-generating GUID primary key for each of my tables (excepting look-up tables) I know I'll never lose sleep over duplicate keys, merging tables, etc. To me it just makes sense philosophically that any given record should be unique across all domains, and that that uniqueness should be represented in a consistent way from table to table. I realize it will never be the most performant option, but putting performance aside, I'd like to know if there are philosophical arguments against this practice?

    Read the article

  • HTML Encoding with ASP.NET

    - by Corin
    I am currently html encoding all user entered text before inserting/updating a db table record. The problem is that on any subsequent updates, the previously encoded string is reencoded. This endless loop is starting to eat up alot of column space in my tables. I am using parameterized queries for all sql statements but am wondering would it be safe to just let the .NET Framework handle this part without the HTML Encoding?

    Read the article

  • How can I monitor the rendering time in a browser?

    - by adpd
    I work on an internal corporate system that has a web front-end as one of its interfaces. The web front-end is served up using Tomcat. How can I monitor the rendering time of specific pages in a browser (IE6)? I would like to be able to record the results in a log file (separate log file or the Tomcat access log).

    Read the article

  • How much Maximum Data we can store in a File in salesforce

    - by Ritesh Mehandiratta
    i searched a little for the size of file in salesforce . i found this link http://help.salesforce.com/HTViewHelpDoc?id=collab_files_size_limits.htm&language=en_US its showing that file size can be upto 2 GB.i have to store IDs in a text file and want to make it scalable for for nearly about 1 Million record .file size will be equal to 15 MB .can any one please provide some good tutorial how to create such kind of files and using it in apex for retrieving and updating data

    Read the article

  • SQL Query to get Count within a Stored Proc

    - by sia
    So i need to figure out how i can get a record count value and use that count as a new value to insert into a table. Ex: In My Stored Procedure @Count int What im looking for @Count to equal "select top (1) _fieldName from _someTable order by _fieldName Desc" Finally insert into _newTable (_fieldName) values (@Count) End I dont have to use a variable, just trying to demonstrate what im really trying to do. My SQL knowledge is pretty limited so no laughing, or smirking! ;)

    Read the article

  • AppEngine: how do cursors work?

    - by victor a.k.a. python for ever
    hello, i have the following code def get(self): date = datetime.date.today() loc_query = Location.all() last_cursor = memcache.get('location_cursor') if last_cursor: loc_query.with_cursor(last_cursor) loc_result = loc_query.fetch(1) for loc in loc_result: self.record(loc, date) taskqueue.add( url='/task/query/simplegeo', params={'date':date, 'locid':loc.key().id()} ) if len(loc_result): memcache.add('location_cursor', loc_query.cursor()) taskqueue.add(url='/task/count/', method='GET') else: memcache.add('location_cursor', None) i don't know what i'm doing wrong, but i am getting the same cursor which is not the effect i wanted. why isn't the cursor moving?

    Read the article

< Previous Page | 146 147 148 149 150 151 152 153 154 155 156 157  | Next Page >