Sunday, 15 April 2012

sql server - find the duplicate and write it in log file -


I have a code that reads AC no, RTN, name and AMT in the record file and reads the stores in stores. After this I have created SQL which stores RecordSet data in the SQL Server 2005 table.

The problem is that the exono column has the primary key but in my text file I have some duplicate exxno while adding the record set in the database, if it looks like a duplicate esenano, then it is stopping there and that duplicate The column is not inserting a row after.

Now what I want to do is if there is a duplicate column, then I want to store that column in the log file and leave that column and put the remaining column in the dash. I do not know how to do this. Can anybody help me. Check out how to duplicate columns and leave that and prefer to insert the rest. Record the database to frmDNELoad.lblStatus.Caption = "Data Loading Database in ......" dim lngRecCount as long lngRecCount cmdCommand with = 0 .ActiveConnection = objConn .CommandText = 'And the "rcdDNE" ("RTN") and "t_DATA_DneFrc (RTN, AccountNbr, First, MiddleName, Last Name, Zodiac) values ​​(" "', '' and rcdDNE rcdDNE.MoveFirst (" AccountNbr ") and" '' And rcdDNE ("first") and "'," "and rcdDNE (" MiddleName ") and"', "" and rcdDNE ("last name") and "'," and RcdDNE ("zodiac") and "')" .CommandType = adCmdText end set rcddnefrc = New ADODB.Recordset with rcddnefrc .ActiveConnection = objConn. Source = "Select * FROM T_DATA_DNEFRC" .CursorType = adO PenDynamic .CursorLocation = adUseClient .LockType = AdLockOptimistic.Until rcdDNE.EOF lngRecCount = lngRecCount + 1 frmDNELoad.lblStatus.Caption = "Adding a record" & lngRecCount & "of" & rcdDNE.RecordCount and "in database." FrmDNELoad.Refresh DoEvents Call CommitNew rcdDNE.MoveNext Loop frmDNELoad.lblStatus.Caption = "DNE Processing Complete." FrmDNELoad.Refresh termination function Sub CommitNew () 'rcddnefrc .Requery. AddNew. Add records on DneFrc table with fields! [RTN] = rcdDNE.Fields! [RTN] .Fields! [AccountNbr] = rcdDNE.Fields! [AccountNBR]. Fields! [First] = rcdDNE.Fields! [First] .Fields! [MiddleName] = rcdDNE.Fields! [MiddleName] .Fields! [Last name] = rcdDNE.Fields! [LASTNAME] .Fields! [Zodiac] = rcdDNE Fields! [Zodiac] .Update with End End Sub

to add to the maintenance of my suggestion error Will be commissions new to see if the row will insert the primary key infringed, and if it is, then handling the other.

example:

  sub-comment new) '' error on gotit Niv_Error DaveFrc #Add record on table rcddnefrc .Requery .addNew with Fields! [RTN] = rcdDNE.Fields! [RTN] .Fields! [AccountNbr] = rcdDNE.Fields! [AccountNbr] .Fields! [First] = rcdDNE.Fields! [First] .Fields! [MiddleName] = rcdDNE.Fields! [MiddleName] .Fields! [Last name] = rcdDNE.Fields! [LASTNAME] .Fields! [Zodiac] = rcdDNE. Feilds! [Zodiac] .Update with subdue sub end '# # If there is no error, then run out routine. CommitNew_Error: If Err.Number = -2147217873 then 'Since you handled' # here the code will only execute if the barrier is infringed call WriteDuplicateAccountToFile () Err.Clear () '' #This clears the error, else '' # Do not do other things with errors "# # If you are not sure, at least show what error its giving, so much MsgBox" had encountered the following error, when the new record was saved: "& amp; ; _VbNewLine & amp; CSRT (error number) & amp; "-" & amp; Error. Description & amp; VbNewLine & amp; _ "New record not saved.", VbOkOnly + vbCritical, "Error" end then End Sub  

For-Each and Pointers in Java -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 7 जवाब

ठीक है, तो मैं हूँ एक ArrayList के माध्यम से पुनरावृत्त करने के लिए tyring और एक specefic तत्व को हटा दें। हालांकि, मुझे हर तरह की संरचना का उपयोग करने में कुछ परेशानी हो रही है। जब मैं निम्न कोड चलाता हूं:

  अर्रे लिस्ट & lt; स्ट्रिंग & gt; Arr = नया अर्रेलिस्ट & lt; स्ट्रिंग & gt; (); // ... कुछ मानों के साथ भरें (वास्तव में कोई बात नहीं है) (स्ट्रिंग टी: arr) {t = "कुछ अन्य मान"; // उम्मीद कर रहा है कि यह वास्तविक सरणी} को बदल देगा (स्ट्रिंग टी: arr) {System.out.println (t); // हालांकि, मुझे अभी भी समान सरणी मिलती है}  

मेरे प्रश्न में, मैं 'arr' को एक संकेतक कैसे बना सकता हूँ ताकि मैं मूल्यों को बदल सकूं प्रत्येक लूप के लिए एक? मुझे पता है कि मैं एक अलग संरचना का उपयोग करके ArrayList के माध्यम से लूप कर सकता हूं, लेकिन यह एक बहुत साफ और पठनीय दिखता है, यह 'टी' सूचक बनाने में सक्षम होना अच्छा होगा।

सभी टिप्पणियों की सराहना की जाती है! यहां तक ​​कि अगर आप कहते हैं कि मैं इसे सिर्फ चूसना चाहिए और एक अलग निर्माण का उपयोग करना चाहिए।

मुझे लगता है कि सबसे अच्छा तरीका लूप का उपयोग करने के लिए हो सकता है।

  ArrayList & lt; स्ट्रिंग & gt; Arr = नया अर्रेलिस्ट & lt; स्ट्रिंग & gt; (); के लिए (int i = 0; i & lt; arr.size (); i ++) {स्ट्रिंग टी = arr.get (i); अगर (// आपकी स्थिति पूरी हुई है) {arr.set (i, "आपका नया मान"); }}  

php - image position and clipping -


Someone knows how to place an image in the webpage, but both positions and clipping (maybe resizing too) are done by interactive Does the user go? I need this for my registration page, I have done some clipping and resizing from CSS and Javascript, and it does not really solve the problem, if it can be done by PHP, then it will be right! Thx

Here's a brief summary:

  • Validate the photo as correct type and dimension using PHP's image functions.

  • / li>

  • Show the user with a dragged DRAG in the browser, which they can resize and move can do. This is the crop area.

  • When you click on "Next", you transmit the server to x, y, width, height DIV or either AJX By or in the form of a hidden field.

  • Again, use the PHP image functions to crop the image, and then resize it.

  • Save it to a permanent place.

Post a comment for further specific answers.


python - Finding the joy of Javascript or searching for another UI-focused languages? -


I am a GUI designer / interactive musician who is keen to improve my programming chops. I know basic (variable, loops, arrays, if / some, some logic) already, but I want to learn in a structured way. I have seen some great books / tips on python and processing (and even flash) which is to teach the fundamentals of programming in fun and accessible. I have salvaged these books and have often considered learning Python, but to be honest, I do not know that these professionals can be useful to me on professional terms. I need something directly related to interactive interface scripting / programming and JS is my best bet (I'm trying AS3 but OOP stuff has made something difficult for me).

I know that JS can be fun (is jazzery). But I have not only found sources of learning which are as strong as the above material. I all get tutorials and books that read web development topics, such as farm verification and AJAX I have tried to find out the framework of the JS game, but all of them have been made for experienced developers and Duke Station or Bijnor There is no shortage of tutorials.

So, any instructions to get happiness in JS? Perhaps there are suggestions on other UI-focused languages? Thanks for reading this long question.

Have you seen? I think there is a programming tutorial which is not available for the best python, it is to say that, Python - it also works with web programming (while not a python based book), but why is this additional information Bad talk?


modal dialog - How do you create a sequence of modalViewControllers? -


I have fought and now I should see it in action. I have a notification button on the title page (UIViewController) and I want to display a scene along with the 'Dismiss' button on the left and want to 'expose the detail to the right'. If a 'wide disclosure' is pressed, it brings the privacy statement view with a single button. If a 'wide disclosure' is pressurized, it will bring a credit-view. I should be able to continue this for additional legal, etc.

Apple will dismiss the entire sequence according to one of the doctors, even if there is no where at that time.

I have been able to get ideas to show I, but they will not reject themselves. This leads me to think that I am not using a favorite approach, but I have a Developed the approach, which leaves me with a false framework.

Any suggestions? My thoughts are, but I only have one level two deep and the dismissal does not work! :( I have a total dead end and have to exit the app to get back to the actual app view.

< P> I got it! Actually, the code is concretized with the 'workflow' view controllers. I prepared a style where most of the tech class is done by the management tool and I keep the book and leave it with the content. I'll need some memory management Review, as I think my current code is probably leaking up the controllers above and below the path. Also, the fact is that I can come back and forth, I think I really have ideas There is neither pile nor model view. I will post the code shortly after the end of the week.


Variable assignment in JavaScript -


I have a JS function

I want to specify a variable in a variable

My variable is in a forloop

I have two variables

i.e.

  var spcd_1 = "http: //www.colbridge com"; Var spcd_2 = "http://www.google.com";  

My JS function is

  function OpenNetwork (SPCD) {// Alert ("Hello"); Var tt = spcd; Warning (tt); Var i = 0; Var spcd_1 = "http://www.colbridge.com"; Var spcd_2 = "http://www.google.com"; (I = 1; i  

My problem is here

  var theurl = spcd_ + i; I  theurl  value to  spcd_1  and  spcd_2  

To properly assign a loop to how to change it,

  var theurl = spcd_ + i;  

Anyone can show me the right way.

Thank you

Looks like you add yourself a variable name Instead of trying, you want to index an array. Your code has been modified

  function OpenNewWondo (SPCD) {// Alert ("Hello"); Var tt = spcd; Warning (tt); Var i = 0; Var spcds = []; Spcds.push ("http://www.colbridge.com"); Spcds.push ("http://www.google.com"); (I = 0; i & lt; spcds.length; i ++) for {var theurl = spcds [i]; PopupWin = window.open (theurl, '_blank', 'menubar, toolbar, location, directory, status, scrollbar, resizable, dependent, width = 640, height = 480, left = 0, top = 0')}}  

Just for giggles, here's how you can use containment to get your variable name. Javascript can also contain objects, which means that you can use the ARA syntax to create and retrieve arbitrary properties

  var spcds = {}; SPCDDS ['SPCDD' '] = "http://www.colbridge.com"; Spcds ['spcd_2'] = "http://www.google.com"; // ... var theurl = spcds ['spcd_' + i];  

Algorithm for fitting 2D polygons in an area? -


Is there a standard for this? Algorithm name?

Say: I have 10 polygons of different sizes. I have an area of ​​specific size.

I want to know how to fill the most polygons in that area and how they fit.

Note: Polygon can be rotated on the basis of the restriction set.

One possible name is one. It is related. These problems need to be NP-hard, and many need rehearsals if you can limit the polygon and allowed forms of the area, then a more efficient algorithm may be present for your particular case.