5,346 Posted Topics
Re: Try, [code] System.Data.OleDb.OleDbDataReader dr; dr = cmd.ExecuteReader(); if(dr.Read()){ byte []b=(byte [])dr.GetValue(0); pictureBox1.Image= new Bitmap(new System.IO.MemoryStream(b,true)); } [/code] | |
Re: [b]>i was able to search it but am racking my brain right now about how to show everything from this row. [/b] SELECT statement with WHERE clause. | |
Re: Welcome sgita729. We appreciate your help. Have you ever noticed that the current thread is two years old? Please do not resurrect old threads and have a look at forum [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]rules[/URL]. Please read before posting - [url]http://www.daniweb.com/forums/thread78223.html[/url] Thread Closed. | |
Re: We appreciate your help. Have you ever noticed that the current thread is two years old? Please do not resurrect old threads and have a look at forum [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]rules[/URL]. Please read before posting - [url]http://www.daniweb.com/forums/thread78223.html[/url] Thread Closed. | |
Re: We appreciate your help. Have you ever noticed that the current thread is two years old? Please do not resurrect old threads and have a look at forum [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]rules[/URL]. Please read before posting - [url]http://www.daniweb.com/forums/thread78223.html[/url] Thread Closed. | |
Re: Have a look at this thread - [url]http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/b955b5cc-335f-4a2d-8fba-1b83af78efe7[/url] | |
Re: [b]>FIND function gives me a runtime error, saying the string is not in the correct format[/b] Argument of [B]Find[/B] method must be primary key column value. I think you are passing string instead of int value. | |
Re: [b]>how connect to the database without writing where it locates in the connectionstring[/b] At least once in your program, you have set the path of database. You an do so by adding connection info in a app.config. | |
Re: Public property in frmMain get/set the label's background. frmMain.cs [code] public Color ChangeColor { get { return label1.BackColor; } set { label1.BackColor = value; } } [/code] frmOther.cs - Click handler of button. [code] private void button1_Click(object sender, EventArgs e) { foreach (Form frm in Application.OpenForms) { if (frm is … | |
Re: Have a look at - [url]http://www.bouncycastle.org/csharp/[/url] | |
Re: You can use [B]int.TryParse[/B] method to convert String to integer. [code] int no1,no2,no3; int.TryParse(textBox3.Text, out no1); int.TryParse(textBox4.Text, out no2); no3= no1 - no2; textBox11.Text= no3.ToString(); [/code] | |
Re: You can paint images using GDI+. (System.Drawing classes) | |
Re: [b]>Can someone please tell me why this is not working?[/b] Set Expires property then see what happens. | |
Re: [b]>So what is the first thing I have to do to be able to put a basic layout to the site? And is it a hard thing?[/b] Start to learn HTML/Css and JavaScript. You need more practice. | |
Re: [b]>Can you tell me how do I set up create Insert, Update and Delete commands for your a DataAdapter?[/b] You can configure Insert/Update/Delete commands manually or by using [B]CommandBuilder[/B] class. Using CommandBuilder, [code] ' Setup the Connection string. '----------------------------- Dim strConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Emad's Section\Development\Visual Studio\Projects\ISGL School Application\ISGL … | |
Re: [b]>how I can create a new page(.aspx) usong a button.[/b] There is no way to create .aspx programatically. However you can write [B]Handler[/B] which produce dynamic content when it is requested. Take a look at this article - [url]http://support.microsoft.com/kb/308001[/url] and tutorial - [url]http://dotnetperls.com/ashx-handler[/url] | |
Re: You should write, [code] string str="viewrecords.aspx?Name=" + textbox1.Text; Response.Redirect(str); [/code] | |
Re: Create a folder named [B]App_Code[/B] under your application root and copy [B]PathResolver.cs[/B] in it. | |
Re: [b]>I want to know version no. of dll file using the above code that i have written.[/b] [code] System.Reflection.Assembly[] ar = AppDomain.CurrentDomain.GetAssemblies(); for (int i = 0; i < ar.Length; i++) { Console.WriteLine(ar[i].FullName ); } [/code] | |
Re: [b]>i want report viewer with adodb connection + vb.net[/b] You can download Visual basic.net express from microsoft site. | |
Re: Welcome srdusad. Please do not resurrect [B]old threads[/B] or [B]solved threads[/B]. Have a look at forum rules: [url]http://www.daniweb.com/forums/faq.php?faq=daniweb_policies[/url] [url]http://www.daniweb.com/forums/thread78223.html[/url] Thread Closed. | |
| |
Re: Use Label1.BeginInvoke. [code] Label1.BeginInvoke(myDoCount, Label2) [/code] | |
Re: [b]>how can we access a global variable defined in xxx.asax file in asp.net[/b] [URL="http://msdn.microsoft.com/en-us/library/system.web.httpapplicationstate.aspx"] Application[/URL] object. | |
Re: Take a look, [code] private bool delImage(string id) { string query="select mpic from mobile where mid=@p1"; .... OleDbCommand cmd=new OleDbCommand(query,dbcon); cmd.Parameters.AddWithValue("@p1",id); dbcon.Open(); object result=cmd.ExecuteScalar(); dbcon.Close(); if(result!=null) { string path= StartPath + "\\images\\" + result.ToString(); System.IO.File.Delete(path); return true; } return false; } [/code] | |
Re: [b]>Any idea about the Sharepoint Databse structure ?[/b] Read - [url]http://en.wikipedia.org/wiki/Microsoft_SharePoint[/url] [b]> I am using SqlServer 2005 with .NET, Sharepoint How to access my database? [/b] Read - ADO.NET [b]>where is connection file in sharepoint ?[/b] Read - ADO.NET | |
Re: [code] <script type="text/javascript"> function NumberOnly(){ var t=window.event.keyCode; if(t>=48 & t<=57) return; window.event.keyCode=0; } </script> ..... <asp:TextBox ID="TextBox3" onkeypress="NumberOnly()" runat="server"></asp:TextBox> [/code] | |
Re: Take a look at the properties of [B]My.Computer.FileSystem[/B] and [B]My.Computer.FileSystem.SpecialDirectories[/B]. | |
Re: [b]>What I mean exactly is the installation forms with the <BACK>,<NEXT> and <CANCEL> buttons as we see in most of the windows installed programs.[/b] Its called - Setup & Deployment. Have a look at MSDN links: 1.[URL="http://msdn.microsoft.com/en-us/library/ms235317%28VS.80%29.aspx"] Deploy using a Setup and Deployment Project .[/URL] 2. [URL="http://msdn.microsoft.com/en-us/library/wx3b589t%28VS.80%29.aspx"]Setup and Deployment Projects.[/URL] | |
Re: [b]>But now i want to edit from textbox , and the textfile also change.[/b] Not sure what do you want. You can use System.IO.File class methods to read/write text. | |
Re: [B]Handles[/B] is missing. [code] Protected Sub lnkPurchaser1_Command(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs) Handles lnkPurchaser1.Command Session("personid") = e.CommandArgument.ToString Response.Redirect("PeopleDetail.aspx") End Sub [/code] | |
Re: [b]>Can I please have this thread deleted?[/b] No. You/We can't. | |
Re: [b]>Split each line into a 3D array[/b] You need to create an array of 3 elements of double type. Take a look at this sample, [code] Dim lines() As String = System.IO.File.ReadAllLines("DataFile.txt") Dim list As New List(Of Double()) For Each str As String In lines Dim ele() As Double = … | |
Re: You can use DriveInfo, Directory, File classes of System.IO namespace. | |
Re: [b]>Is this done in SQL in my Stored Procedure[/b] You can do so by passing some reference details from the value of previously selected combobox. [code] CREATE PROCEDURE dbo.up_Fill_Vendor_Combo @repairCat varchar(40) AS SELECT VendorID, CompanyName FROM Vendors Where RepairCategory=@repairCat ORDER BY CompanyName [/code] | |
Re: The Ternary or conditional operator returns one of two values depending on the value of a [B]Boolean expression.[/B] Specify the return type of your methods. [code] static void Main() { for (int i = 0; i < 10; ++i) { int j=i > 5 ? MethodA(i) : MethodB(i); } } … | |
Re: Try this, [code] myds1.DSPT.DefaultView.RowFilter = "MaNganh='"+ m1 +"' and Nam ='" + tbnamhoc.Text + "' and HocKy ='" + tbhocky.Text + "' and KhoaHoc='" +tbkhoahoc.Text + "'"; [/code] | |
Re: Regular expression : [code] Dim regx = New System.Text.RegularExpressions.Regex("[,']") Dim v1 = regx.Replace("2,500.75", "") [/code] | |
Re: I think you should purchase a C# book. Have a look at code-snippet. [code] using System; class Test { static int Add(int val1, int val2) { return val1 + val2; } static int Sub(int val1, int val2) { return val1 - val2; } static int MyMath(string action, int no1, int … | |
Re: Have you tried TimeSpan? [code] TimeSpan tm= dt1 - dt2; [/code] | |
Re: You can do so by adding AJAX - updatepanel. Map the button's click with trigger of updatepanel where you can get the count of selected items. | |
Re: Set toolStripStatusLabel1.AutoSize=false | |
Re: You can use methods of System.Diagnostics.Process & ProcessStartInfo class. [code] System.Diagnostics.ProcessStartInfo ps = new System.Diagnostics.ProcessStartInfo(put_here_commandOrfilename); ps.Arguments = put_here_arguments; ps.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; ps.UseShellExecute = false; ps.RedirectStandardInput = true; ps.RedirectStandardOutput = true; ps.RedirectStandardError = true; System.Diagnostics.Process process=System.Diagnostics.Process.Start(ps); process.WaitForExit(); string output = process.StandardOutput.ReadToEnd(); process.Close(); [/code] | |
Re: Use Application.Exit() method to stop the application domain. | |
Re: [b]>I can't figure out how to get the main window (Streaming File) to stream to the picturebox on the second form. How would I do this?[/b] Write a public method or a property in the second form. [code] public Image Form1Image { get { return picture1.Image;} set { picture1.Image=value;} } … | |
Re: You can use [B]ASP.NET Table[/B] server control or you can concatenate html tags & text to show the output. | |
Re: You have to purchase third party components api. See the [URL="http://bytescout.com/products/developer/swfslideshowsdk/swfslideshowscout_example_vb_net.html"]demo[/URL]. | |
Re: Remember if connection is opened then close it before leaving that method. | |
Re: Hi, Have a look at code-project article - [url]http://www.codeproject.com/KB/applications/thumbtools.aspx[/url] |
The End.