5,346 Posted Topics
Re: Line #71 - Use different filename to save an image. [code] img.Save("c:\\sample.gif", jpegCodec, encoderParams); [/code] | |
Re: [b]>Please write code in VB.net [/b] That's not help. That would be doing your homework for you. Read the forum [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]rules[/URL]. | |
Re: PHP and perl uses interpreter where C# code is translated by the compiler. [b]>Is there a way to import the contents of a text file into a source code file upon compilation?[/b] [URL="http://msdn.microsoft.com/en-us/library/kkz9kefa%28VS.71%29.aspx"] Build[/URL]. | |
Re: For Sql Compact database use classes from [b]System.Data.SqlServerCe[/b] namespace. Take a look at sample, [code] Dim cn As New System.Data.SqlServerCe.SqlCeConnection("Data Source=c:\Database1.sdf") cn.Open() Dim cmd As New System.Data.SqlServerCe.SqlCeCommand("create table test (tno int)", cn) cmd.ExecuteNonQuery() cn.Close() [/code] PS: Add a reference of System.Data.SqlServerCe.DLL | |
Re: Use DataAdapter instead of DataReader class. [code] .. SqlDataAdapter adp; DataTable dt; int ind; private void Form1_Load(object sender, EventArgs e) { adp = new SqlDataAdapter("select * from tablename", "put_connection_string_here"); dt = new DataTable(); adp.Fill(dt); ind = 0; showRec(); } private void button1_Click(object sender, EventArgs e) { ind++; showRec(); } void … | |
Re: [b]>I already set the security permission, User: ADMIN\Everyone to full-access, but this error still pops-up. Any ideas how will I make it work?[/b] Set permission for USERS group and Internet guest user account. | |
Re: [b]..function to download a file from a network drive instead of local drive? [/b] From [URL="http://en.wikipedia.org/wiki/Download"]Wiki[/URL] - In computer networks, to download means to receive data to a local system from a remote system, or to initiate such a data transfer. PS:I'm not quite following your problem. | |
Re: [b]>I want to display a screen as soon as the CD(or pendrive etc.) is inserted into the users computer[/b] [URL="http://en.wikipedia.org/wiki/AutoRun"]Autorun[/URL]. | |
![]() | Re: Read following articles: 1. Deploying Windows Applications—[URL="http://en.csharp-online.net/Deploying_Windows_Applications%E2%80%94Prerequisites"]Prerequisites[/URL]. 2. Embedding [URL="http://msdn.microsoft.com/en-us/library/bb264562%28SQL.90%29.aspx"]SQL Server Express[/URL] into Custom Applications. ![]() |
Re: DBNull.Value. This assignment is valid for a column of any type. [code] IF IsNumeric(TxtLani.Text)=false Then cmd.Parameters.AddWithValue("@Lani_Lani Rs", DBNull.Value) ELSE cmd.Parameters.AddWithValue("@Lani_Lani Rs", txtlani.Text) END IF [/code] | |
Re: Do not initialize input parameters within stored-procedure definition. [code] CREATE procedure [dbo].[MonthlyFees] @a float OUTPUT, @account varchar(10), @session varchar(50), @class varchar(50) As if exists(select *from paymentmaster) SET @a= (select top 1 monthlyBalance from paymentmaster where accountnumber =@account and class =@class and session=@session order by id desc ) else set @a=0.0 … | |
Re: Have a look, [code] string cnstr = ""; cnstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\folder\Book1.xls;Extended Properties=Excel 8.0;"; OleDbConnection cn = new OleDbConnection(cnstr); OleDbCommand cmd = new OleDbCommand(); cmd.CommandText = "SELECT * INTO [MS Access;Database=C:\\test1.mdb].[Sheet1] FROM [Sheet1$]"; cmd.Connection = cn; cn.Open(); cmd.ExecuteNonQuery(); cn.Close(); [/code] | |
Re: You have to specify the size argument. [code] SqlParameter paruser = emailcmdsql.Parameters.Add("@user", SqlDbType.VarChar,30); .... SqlParameter paremail = emailcmdsql.Parameters.Add("@email", SqlDbType.VarChar,50); ... SqlParameter parpassword = emailcmdsql.Parameters.Add("@password", SqlDbType.VarChar,30); [/code] | |
Re: [b]>Is this possible?[/b] Yes. Use row index (int value) with [B]myDataGrid.Rows[index].Cell[0].etc[/B] | |
Re: Remove lines from 155 to 163 and use ExecuteNonQuery instead of ExecuteReader. [code] cmd1.ExecuteNoneQuery() [/code] | |
Re: Threads : [indent] 1. [url]http://www.daniweb.com/forums/thread137692.html[/url] 2. [url]http://www.daniweb.com/forums/thread219606.html[/url] 3. [url]http://www.daniweb.com/forums/thread140460.html[/url] 4. [url]http://www.daniweb.com/forums/thread78123.html[/url] [/indent] | |
Re: Be more specific about your problem. Are you working with php or c#? | |
Re: [b]>how can a play a second SWF file AFTER the first has finished?[/b] Timer event to have the status of [b]Playing[/b] property. | |
Re: Remove the try catch finally block. If it throws an exception then post error (message) trace here. | |
Re: Try out this code - http://www.daniweb.com/forums/thread75595.html > i am getting the error as Mailbox Unavailable. You need to set Relay IP-Address. (Relay restrictions). Steps: 1. Open IIS applet from the control panel 2. Go to0 Default SMTP Virtual Server 3. Select tab Access + Click on Relay. 4. Add IP … | |
Re: Welcome veeruanu. Please do not resurrect old threads. Read members rules at daniweb - [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]http://www.daniweb.com/forums/faq.php?faq=daniweb_policies[/URL] Thread Closed. | |
Re: @ashab27 Please read the [rules](http://www.daniweb.com/forums/faq.php?faq=daniweb_policies) before posting again, in particular the 'keep it organized' one - For easy readability, always wrap programming code within posts in (code) (code blocks) and (icode) (inline code) tags. If you hit 10 infraction points your account gets an automatic ban, so it is worth … | |
Re: [b]>I want to validate the user id that was entered in a textbox.[/b] 1. Use escaped string. 2. Use Parametrized query. [b]>without refreshing the page[/b] AJAX - asynchronous JavaScript and XML. | |
Re: Have a look at this MSDN article - [url]http://msdn.microsoft.com/en-us/magazine/ee335706.aspx[/url] | |
![]() | Re: Sorry, I'm not quite following your problem. Can you maybe provide some more information? ![]() |
Re: [b]>How to do Change font,color,insertlink,orederList of text in Textarea?[/b] JavaScript. Take a look at [URL="http://www.webreference.com/programming/javascript/gr/column11/"]How to create wysiwyg hmtl editor?[/URL] | |
Re: Have a look at this article - [url]http://wiki.asp.net/page.aspx/687/http-handlers-to-handle-images/[/url] | |
Re: Take a look at[URL="http://www.vbforums.com/showthread.php?t=526241"] FAQ[/URL]. | |
Re: Use [URL="http://msdn.microsoft.com/en-us/library/c76dd5k1%28VS.71%29.aspx"]@Register[/URL] directive. | |
Re: Use PreparedStatement (Parameterized Queries). Variables passed as arguments to prepared statements will automatically be escaped by the JDBC driver. Maybe you might want to text-encoding . | |
Re: Dim txt as String="Not Found" Dim i As Integer = RichTextBox1.Text.IndexOf(txt, 0) While i <> -1 RichTextBox1.SelectionStart = i RichTextBox1.SelectionLength = txt.Length RichTextBox1.SelectionColor = Color.Red i = RichTextBox1.Text.IndexOf(txt, i + 1) End While ... | |
Re: Thanks WaltP. [b]>I would like to read a file and display certain lines ( like from line 5 to 10) in a label.[/b] ReadAllLines() method of File class will solve your problem. [code] Dim lines() As String = System.IO.File.ReadAllLines("file_path") [/code] | |
Re: Walkthrough: [URL="http://msdn.microsoft.com/en-us/library/bb398929.aspx"]Using Validation Controls Inside an UpdatePanel Control.[/URL] | |
Re: [b]>Is web.config file is must to execute any asp.net application[/b] It is a [URL="http://msdn.microsoft.com/en-us/library/aa719558%28VS.71%29.aspx"]web application configuration[/URL] file. | |
Re: [b]>My problem is when i select the end day of the month it gives me a negative days in txtdays.[/b] [code] Dim tm as TimeSpan tm= dtpEnd.Value - dtpStart.Value txtDays.Text= tm.Days.ToString() [/code] | |
Re: [b]>What I have so far.... Please get it to run! I'm stumped![/b] Bjarne Stroustrup's advice - [icode]If you can think of ‘‘it’’ as a separate idea, make it a class.[/icode] The key to writing good programs is to design classes so that each cleanly represents a single concept. Please read … | |
| |
Re: Have a look at codeproject article - [url]http://www.codeproject.com/KB/audio-video/WebcamUsingDirectShowNET.aspx[/url] | |
Re: Please, show us your work. Read [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]Daniweb [/URL]rules and homework policy ~[URL="http://www.daniweb.com/forums/announcement61-2.html"]We only give homework help to those who show effort[/URL]~ if you run into problems and want to ask for help here. | |
Re: [b]>Changing windows sound volume[/b] Use "winmm.dll" api. | |
Re: [b]>Can I access a web service via software?[/b] Of course, Yes. [b]>how can I do it? [/b] You can consume web-service using html, javascript (ajax) and many other programming languages (and frameworks). | |
Re: [b]>conversion from double to int possible loss of data[/b] Return data type of getVal() must be double. [code] double sMatrix::getVal() { ... } [/code] [b]>function doesn't take 2 arguments[/b] Method setEl() has three parameters. e.g setEl(row,col,value) First two parameters must be int type. Replace setEl(i,j)+=N.setEl(i,j) with, [code] setEl(i,j, getEl(i,j) + … | |
Re: You have to add a parameter. [code] Protected Sub recordcount_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles recordcount.Click Dim con As New Data.SqlClient.SqlConnection() con.ConnectionString = ConfigurationManager.ConnectionStrings()("ConnectionString").ConnectionString Dim cmd As New Data.SqlClient.SqlCommand() cmd.CommandText = "select count (*) from images where userid=@Userid" cmd.CommandType = Data.CommandType.Text cmd.Connection = con [COLOR="Red"] cmd.Parameters.AddWithValue("@Userid","a0001")[/COLOR] con.Open() … | |
Re: Authorization prevent an access of .css an other resources. You may use location markup to override the settings, [code=text] .... <location path="~/css1.css"> <system.web> <authorization> <allow users="?"/> </authorization> </system.web> </location> .... [/code] | |
Re: [b]>The data source is a query. The names all match.[/b] How can you say that? - data source is a query. You are assigning a value to the SelectedValue property of 'GuardianshipDropDownList' which is not available in GuardianshipDropDownList's Items collection. | |
Re: [b]>I'm trying to get my program to write the content of textbox1 into a textfile specified at a particular location.[/b] You can not save file outside your web application. In fact , web app can not perform read / write action on client machine. I think you misunderstood FileUpload control. … | |
Re: Thanks for your suggestion. This thread is 3 years old. Please do not resurrect old/solved threads. If you want to ask question then start your own thread. Thread Closed. | |
Re: anw2010, If you want to ask question, start your own thread. Please do not resurrect old/solved thread. Thread Closed. | |
Re: [b]>But I could not find any option to add a class( CodeTypeDeclaration) to another class as member.[/b] [code] CodeNamespace ns = new CodeNamespace("com.me"); ns.Imports.Add(new CodeNamespaceImport("System")); CodeTypeDeclaration class1 = new CodeTypeDeclaration("Student"); CodeTypeDeclaration class2 = new CodeTypeDeclaration("Marks"); class2.IsClass =true; class2.TypeAttributes = System.Reflection.TypeAttributes.NestedPublic; class1.Members.Add(class2); ns.Types.Add(class1 ); CodeDomProvider pv = CodeDomProvider.CreateProvider("C#"); ICodeGenerator g = … |
The End.