Search Results

Search found 31200 results on 1248 pages for 'field service'.

Page 112/1248 | < Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >

  • how to save byte[] value to varbinary(64) field on database

    - by shamim
    byte[] a = HashEncript("a"); public byte[] HashEncript(string Password) { SHA512Managed sha = new SHA512Managed(); byte[] hash = sha.ComputeHash(UnicodeEncoding.Unicode.GetBytes(Password)); return hash; } i want to save byte[] a this value on my database .My database field is varbinary(64).i use msSQL2008 .how to save ,want to know the insert query with C# code.

    Read the article

  • Why does GetWindowThreadProcessId return 0 when called from a service

    - by Marve
    When using the following class in a console application, and having at least one instance of Notepad running, GetWindowThreadProcessId correctly returns a non-zero thread id. However, if the same code is included in a Windows Service, GetWindowThreadProcessId always returns 0 and no exceptions are thrown. Changing the user the service launches under to be the same as the one running the console application didn't alter the result. What causes GetWindowThreadProcessId to return 0 even if it is provided with a valid hwnd? And why does it function differently in the console application and the service? Note: I am running Windows 7 32-bit and targeting .NET 3.5. public class TestClass { [DllImport("user32.dll")] static extern uint GetWindowThreadProcessId(IntPtr hWnd, IntPtr ProcessId); public void AttachToNotepad() { var processesToAttachTo = Process.GetProcessesByName("Notepad") foreach (var process in processesToAttachTo) { var threadID = GetWindowThreadProcessId(process.MainWindowHandle, IntPtr.Zero); .... } } } Console Code: class Program { static void Main(string[] args) { var testClass = new TestClass(); testClass.AttachToNotepad(); } } Service Code: public class TestService : ServiceBase { private TestClass testClass = new TestClass(); static void Main() { ServiceBase.Run(new TestService()); } protected override void OnStart(string[] args) { testClass.AttachToNotepad(); base.OnStart(args); } protected override void OnStop() { ... } }

    Read the article

  • calling wcf service with parameter from silverlight4

    - by punam
    I write WCF as follows namespace EventViewer.Web { [ServiceContract(Namespace = "")] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class EventVwrService { [OperationContract] public IEnumerable GetFieldValues(FieldType field) { switch (field) { case FieldType.Source: return new List() { "SQL Server", "BizTalk Server", "MSIInstaller", "ADV", "SQLAgent" }; case FieldType.EventId: return new List() { "10115", "20988", "23434", "12323", "890099" }; default: throw new Exception ("Unknown type"); } } } } I have to call WCf according to combobox selectied items. Please help me

    Read the article

  • Getting the data inside the C# web service from Jsonified string

    - by gnomixa
    In my JS I use Jquery's $ajax functions to call the web service and send the jsonified data to it. The data is in the following format: var countries = { "1A": { id: "1A", name: "Andorra" }, "2B": { id: 2B name: "Belgium" }, ..etc }; var jsonData = JSON.stringify({ data: data }); //then $ajax is called and it makes the call to the c# web service On the c# side the web service needs to unpack this data, currently it comes in as string[][] data type. How do I convert it to the format so I can refer to the properties such as .id and .name? Assuming I have a class called Sample with these properties? Thanks! EDIT: Here is my JS code: var jsonData = JSON.stringify(countries); $.ajax({ type: 'POST', url: 'http://localhost/MyService.asmx/Foo', contentType: 'application/json; charset=utf-8', data: jsonData, success: function (msg) { alert(msg.d); }, error: function (xhr, status) { switch (status) { case 404: alert('File not found'); break; case 500: alert('Server error'); break; case 0: alert('Request aborted'); break; default: alert('Unknown error ' + status); } } }); inside c# web service I have: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using System.Data; using System.Collections; using System.IO; using System.Web.Script.Services; [WebMethod] [ScriptMethod] public string Foo(IDictionary<string, Country> countries) { return "success"; }

    Read the article

  • Making skype like token field for adding users to a chat

    - by Miraaj
    Hi all, In Mac, in skype when we add users to an existing chat, by clicking '+' button on top, a beak like window appears carrying a token field like control. When an user types some name in it and a match is found then a list appears carrying user icon , status icon and his/her name. Also the width of dynamic list is same as beak window. Can any one suggest some way to create similar control? Thanks in advance, Miraaj

    Read the article

  • Doctrine Update by DQL + field with parenthesis: "(" and ")"

    - by Paulo
    Hello! I have a doctrine update query to save my data: $customer = Doctrine_Query::create() -update('Customer') -set('fax',"'". $this-getRequest()-getParam('fax')."'") -where('id ='.$this-getRequest()-getParam('id')) -execute(); The problem is that the field fax has parenthesis and doctrine returns an error in the query because of these parenthesis "(" and ")". Somebody knows a solution for this? Thank's

    Read the article

  • SOLR not searching on certain fields

    - by andy
    hey guys, just installed solr, edited the schema.xml, and am now trying to index it and search on it with some test data. In the XML file I'm sending to SOLR, one of my fields look like this: <field name="PageContent"><![CDATA[<p>some text in a paragrah tag</p>]]></field> There's HTML there, so I've wrapped it in CDATA. In my SOLR schema.xml, the definition for that field looks like this: <field name="PageContent" type="text" indexed="true" stored="true"/> When I ran the POSTing tool, everything went ok, but when I search for content which I know is inside the PageContent field, I get no results. However, when I set the node to PageContent, it works. But if I set it to any other field, it doesn't search in PageContent. Am I doing something wrong? what's the issue? thanks very much for any help cheers! UPDATE Just to clarify on the error. I've uploaded a "doc" with the following data: <field name="PageID">928</field> <field name="PageName">some name</field> <field name="PageContent"><![CDATA[<p>html content</p>]]></field> In my schema I've defined the fields as such: <field name="PageID" type="integer" indexed="true" stored="true" required="true"/> <field name="PageName" type="text" indexed="true" stored="true"/> <field name="PageContent" type="text" indexed="true" stored="true"/> And: <uniqueKey>PageID</uniqueKey> <defaultSearchField>PageName</defaultSearchField> Now, when I use the Solr admin tool and search for "some name" I get a result. But, if I search for "html content", or "html", or "content", or "928", I get no results why? cool, thanks!

    Read the article

  • How to save byte[] to varbinary(64) field in database

    - by shamim
    I have byte[] a = HashEncrypt("a"); with public byte[] HashEncrypt(string password) { SHA512Managed sha = new SHA512Managed(); byte[] hash = sha.ComputeHash(UnicodeEncoding.Unicode.GetBytes(password)); return hash; } I want to save byte[] a to my database. My database field is a varbinary(64). I'm using SQL Server 2008. I want to know the insert query with C# code. I am using ADO.NET

    Read the article

  • text field significantly bigger in certain browser

    - by ian
    I have the below text field in my page: <input class="message" id="message" name="message" type="text" size="65" /> For some reason in the latest FireFox for OS X it is about 200pixels wider than it is in the latest Chrome (mac/pc) FireFox(pc) and IE(pc) Any suggestions on how I can fix this or why this is happening?

    Read the article

  • ASP.NET: Bind HyperLinkColumn to more than one field

    - by Jonathan Allen
    Using ASP.NET and the DataGrid, how do I bind a HyperLinkColumn to more than one field? Dim detail As New HyperLinkColumn With detail .Text = "View Details" .HeaderText = "" .NavigateUrl = "\TeamDetail.aspx?Account={0}&Broker={1}" .DataNavigateUrlField = "AccountKey, BrokerNumberKey" End With I was hoping for an data-binding event on HyperLinkColumn but no such luck.

    Read the article

  • MSSQL - select date field in table

    - by thegunner
    Hi, In my table I have a date column which the date is displayed in the format "2009-11-18 10:55:28.370" How can just get the date value of this field in a select statement. e.g. select id from risks, where creation_date = getdate()

    Read the article

  • Rolling back a transaction in a Grails Service

    - by UltraVi01
    I have been updating all my services to be transactional by using Grail's ability to rollback when a RuntimeException is thrown in the service. I have, in most cases, doing this: def domain = new Domain(field: field) if (!domain.save()) { throw new RuntimeException() } Anyways, I wanted to verify that this indeed will rollback the transaction... it got me thinking as to whether at this point it's already been committed.. Also, if not, would setting flush:true change that? I am not very familiar with how Spring/Hibernate does all of this :)

    Read the article

  • Cannot install windows service

    - by Matthew Dalton
    I have created a very simple window service using visual studio 2010 and .Net 4.0. This service has no functionality added from the default windows service project, other than an installer has been added. If i run installutil.exe appName.exe on my dev box or other windows 2008 R2 machines in our domain the windows service installs without issue. When i try to do this same thing on our customer site, it fails to install with the following error. Microsoft (R) .NET Framework Installation utility Version 4.0.30319.1 Copyright (c) Microsoft Corporation. All rights reserved. Exception occurred while initializing the installation: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\TestService\WindowsService1.exe' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515). This solution has only 1 project and no dependencies added. I have tried it on multiple machines in our environment and two in our customers. The machines are all windows 2008 R2, both fresh installs. One machine has just .net 2.0 and .net 4.0. The other .net 2, 3, 3.5 and 4. I am a local admin on each of the machines. I have also tried the 64bit installer but get the following error, so i think the 32 bit one is the one to use. System.BadImageFormatException Any guidance would be appreciated. Thanks.

    Read the article

  • How to prevent google chrome from caching my inputs, esp hidden ones when user click back?

    - by melaos
    hi there, i have an asp.net mvc app which have quite a few hidden inputs to keep values around and formatting their names so that i can use the Model binding later when i submit the form. i stumble into a weird bug with chrome which i don't have with IE or Firefox when the user submits the form and click on the back button, i find that chrome will keep my hidden input values as well. this whole chunk is generated via javascript hence i believe chrome is caching this. function addProductRow(productId, productName) { if (productName != "") { //use guid to ensure that the row never repeats var guid = $.Guid.New(); var temp = parseFloat($(".tboProductCount").val()); //need the span to workaround for chrome var szHTML = "<tr valign=\"top\" id=\"productRow\"><td class=\"productIdCol\"><input type=\"hidden\" id=productRegsID" + temp + "\" name=\"productRegs[" + temp + "].productId\" value=\"" + productId + "\"/>" + "<span id=\"spanProdID" + temp + "\" name=\"spanProdID" + temp + "\" >" + productId + "</span>" + "</td>" //+ "<td><input type=\"text\" id=\"productRegName\" name=\"productRegs[" + temp + "].productName\" value=\"" + productName + "\" class=\"productRegName\" size=\"50\" readonly=\"readonly\"/></td>" + "<td><span id=\"productRegName\" name=\"productRegs[" + temp + "].productName\" class=\"productRegName\">"+ productName + "<\span></td>" + "<td id=\"" + guid + "\" class=\"productrowguid\" \>" + "<input type=\"text\" size=\"20\" id=\"productSerialNo" + temp + "\" name=\"productRegs[" + temp + "].serialNo\" value=\"" + "\" class=\"productSerialNo\" maxlength=\"18\" />" + "<a class=\"fancybox\" id=\"btnImgSerialNo" + temp + "\" href=\"#divSerialNo" + temp + "\"><img class=\"btnImgSerialNo\" src=\"Images/landing_14.gif\" /></a>" + "<span id=\"snFlag" + temp + "\" class=\"redWarning\"></span></td>" + "<td><input type=\"text\" id=\"productRegDate" + temp + "\" name=\"productRegs[" + temp + "].PurchaseDate\" readonly=\"readonly\" />" + "<span id=\"snRegDate" + temp + "\" class=\"redWarning\"></span></td>" + "<td align=\"center\"><img style=\"cursor:pointer\" id=\"btnImgDelete\" src=\"Images/btn_remove.gif\" onclick=\"javascript:removeProductRow('" + guid + "')\" /><div style=\"display:none;\"><div id=\"divSerialNo" + temp + "\" style=\"font-family:verdana;font-size:11px;width:600px\">" + serialnumbergeneral + "<br /><br />" + getSNImageByCategory(productId) + "</div></div></td>" + "</tr>"; $(".ProductRegistrationTable").append(szHTML); $("a.fancybox").fancybox(); //initialization $("#productRegDate" + temp).datepicker({ minDate: new Date(1996, 1 - 1, 1), maxDate: 0 }); //sanity check //s7test alert('1 '+$("#spanProdID" + temp)); alert('2 '+$("#productRegsID" + temp)); } //end function addNewProductRow i need the id to be refreshed when the user select a new product, but putting another span tag beside it shows that the span will have the new id will the hidden input will still have the previous id. is there an elegant way to workaround this issue? thanks

    Read the article

  • Keeping some choices in the Table for the Field of Type Dropdown

    - by Mercy
    Hi, i am having a Table named Attributes which has id form_id label size sequence_no Type 1 1 Name 200 1 Text 2 1 Age 150 2 Number 3 1 Address 300 3 Textarea 4 1 Gender 200 4 Dropdown I am having the doubt how can i keep the Choices of the Field of type "Dropdown" in the Table Eg. For Gender the choices will Male , Female.. Please give me the suggestions...

    Read the article

  • Android TimePicker hour field disappears after orientation change

    - by sosiouxme
    I am using a TimePicker under API 1.5 and when the orientation is changed on my device (a stock G1 running 1.6 - though NOT on the 1.5/1.6 emulator), the hour field goes blank. It still remembers the hour, it just doesn't show it. Is there any workaround for this? The same problem was described by someone else here: http://groups.google.com/group/android-beginners/browse_thread/thread/b4288004021b876/de5899a2bb291ab5 Nothing helpful was forthcoming - can StackOverflow do better?

    Read the article

< Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >