2,245 Posted Topics
Re: You need to do it in your code behind file: [code] using System; using System.Collections; using System.Configuration; using System.Data; [COLOR="red"]using System.Data.SqlClient;[/COLOR] using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; namespace WebApplication5 { public partial class _Default : System.Web.UI.Page { protected void Page_Load(object … | |
Re: 1. Here is a mock photo class: [code] using System; using System.Collections; namespace daniweb { public class PhotoStuff { private string _fileName; private string _title; private DateTime _date; private ArrayList _photo; public string FileName { get { return _fileName; } set { _fileName = value; } } public string Title … | |
Re: Are you guaranteed to have the same number of A,B,C records? Also are there any other columns in that table? This table structure doesn't make much sense. | |
Re: Use your google-fu Google search term: [code=text] site:daniweb.com +"samir ibrahim" +"Thread Solved" [/code] If you know what forum/language you want to search: [code=text] site:daniweb.com +"samir ibrahim" +"Thread Solved" intitle:VB.NET [/code] | |
Re: That depends on what you want to do with Active Directory. | |
I think daniweb's social groups should be linked off the main page under "Daniweb Community Features" on the bottom right section of the page pointing to: [url]http://www.daniweb.com/forums/group.php[/url] I can't remember how I found the groups but the only way I can get back there now is by viewing my profile, … | |
Re: Use two update statements in your command text. From what I can tell your first update is the same but under a certain condition you have a second update. So do something like: [code] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim SQL As String … | |
Re: It might help if you posted the exact error message and indicated what database you were using | |
Re: [code] sk@sk:/tmp$ cat ba.sh #!/bin/bash x1=3 x2=5 l1=`echo "l (${x1})" | bc -l` RESULT=`echo "${x2} * ${l1}" | bc -l` echo "Result is ${RESULT}" sk@sk:/tmp$ ./ba.sh Result is 5.49306144334054845695 [/code] | |
Re: Some articles that may help: [url]http://www.codeproject.com/KB/system/TSAddinInCS.aspx[/url] [url]http://www.tech-archive.net/Archive/Windows/microsoft.public.windows.terminal_services/2008-06/msg00106.html[/url] What is your project? There are tons of desktop apps out there.... no need to write yet another one. | |
Re: The morning. I get up ~12am-4am depending, get ready for work, head in to work, post on daniweb for an hour or two and drink 2 monster energy drinks (this is my morning 7 days a week). After that things start to go wrong and the day goes down hill … | |
Re: Are these MSDE/Express/Limited installers or the full blown version of SQL Server? If you're using the MSDE installer you need to specify parameters when you launch the setup. [code] setup.exe /qb ADDLOCAL=SQL_Engine,SQL_Data_Files,SQL_Replication,Client_Components,Connectivity,SQL_SSMSEE INSTANCENAME=[COLOR="Red"]InstanceName[/COLOR] SAVESYSDB=1 SQLBROWSERAUTOSTART=1 SQLAUTOSTART=1 AGTAUTOSTART=1 SECURITYMODE=SQL SAPWD=[COLOR="red"]password[/COLOR] DISABLENETWORKPROTOCOLS=0 ERRORREPORTING=1 SQMREPORTING=0 ADDUSERASADMIN=1 INSTALLSQLDIR="%ProgramFiles%\Microsoft SQL Server\" [/code] | |
Re: I personally do not like fedora [b]BUT[/b] that is just my opinion, you should experiment with different distros and form your own. I would recommend ubuntu or debian. You can use phpbb for a forum on top of the apache webserver and mysql backend. It should come as a package … | |
Re: Your main form: [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace daniweb.checkboxes { public partial class frmMain : Form { private frmOther frm; public frmMain() { InitializeComponent(); } private void frmMain_Load(object sender, EventArgs e) { frm = new frmOther(); } … | |
Re: You can declare a private member inside the instance of the form's class. I would think "global" means more along the alones of [icode]public static[/icode] which is not what you want here. Example: [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; … | |
Re: Here is an example of a bash array. These values are split from a CSV line: [code=bash] declare -a varray for aline in `cat $USERFILE` do varray=(`echo $aline | awk '{ split($0, ulist, ","); for(i=1; i<=11; i++) printf ulist[i] " "; }'`) [/code] Note: Doing this in bash is horribly … | |
Re: Try this: [code=bash] sk@sk:/tmp$ cat ba.sh #!/bin/bash for file in *; do filedate=`date -r $file +%Y-%m-%d` currentdate=`date +%Y-%m-%d` if [ ${filedate} == ${currentdate} ]; then echo $file fi done sk@sk:/tmp$ ./ba.sh ba.sh sk@sk:/tmp$ touch a b c sk@sk:/tmp$ ./ba.sh a b ba.sh c sk@sk:/tmp$ [/code] The script is: [code=bash] #!/bin/bash … | |
Re: Take a look at this thread: [url]http://www.daniweb.com/forums/showthread.php?t=215952[/url] | |
Re: What is the error message you are getting? You should evaluate [icode]e.Message[/icode] inside of your [icode]catch()[/icode] statement | |
Re: You don't want to do that. Keep querying the access database ;) | |
Re: You can't -- the Dgrid_Cellclick has more data in the event args than del_click does. Perhaps if you explained what you were trying to do and what controls you are using we could provide you with another solution. If del is a button, for example, then you could look up … | |
Re: I don't think you can use a PrintForm control to automagically resample the image to a different size. Are you ok with trying another approach or does it have to be a printForm? | |
Re: You haven't provided nearly enough code for that project to compile. Can you upload the entire solution? I get 20+ build errors. | |
Re: Good luck with that, I don't think ASP.NET handles large files very well :( It is my understanding that the webserver digests the entire upload in memory before handing it over to the page processing the file so you're looking at 100mb of memory allocation before your page even loads. … | |
Re: If lengthy tasks count then 10. Back before the days of sysprep'ing machines we installed we would line them up and go down the line installing Windows :) We only had enough room for 10 displays on the table. And yes, in hindsight, I know there were many better ways … | |
Re: Use [icode]bcp[/icode] to bulk import them. [URL="http://www.google.com/search?hl=en&q=mssql+bcp+tsv&aq=f&oq=&aqi=g10"]Bulk Copy[/URL] | |
Re: Is each line a number, or is a bunch of lines with comma separated numbers, is it one huge number, or .... ? | |
Re: You should use [icode]%[/icode] for a wildcard in queries, not [icode]*[/icode]. | |
Re: Have your form run in two modes: One in "Normal" mode for usage and one for "Record" mode. I had a very similar concept once for making a customizable dashboard where they could put their favorite items on the application's main form. They basically pushed a button then selected a … | |
Re: You should handle that in your application layer, not in SQL. If you do want to handle it in SQL then you should use "sproc delegates" to avoid building dynamic sql. sproc - Determined which table to call: A or B sprocA - Call table A sprocB - Call table … | |
Re: Please use code tags when pasting code or text on daniweb: What is the actual error message from the SQL Client? You can trap this by adding a try..catch around your [icode]conn.Open()[/icode] calls. Example: private static DataTable RunQuery(string query) { const string connStr = @"Data Source=apex2006sql;Initial Catalog=Leather;Integrated Security=True;"; DataTable result … | |
Re: Your way is fine but you could use [icode]TryParseExact[/icode]: [code] private void button4_Click(object sender, EventArgs e) { DateTime dt; if (DateTime.TryParseExact("20090916114135766", "yyyyMMddhhmmssfff", new System.Globalization.CultureInfo("en-US"), System.Globalization.DateTimeStyles.None, out dt)) { MessageBox.Show(dt.ToString()); } } [/code] | |
Re: I coded up a little asynchronous twitter API. It looked fun: [code] using System; using System.IO; using System.Net; using System.Runtime.Remoting.Messaging; namespace daniweb { public class TwitterReader : IDisposable { // private string username; private string password; private bool running; // private const string url = @"http://stream.twitter.com/1/statuses/sample.json"; // public event OnTwitterLineReceived … | |
Re: Also check out [URL="http://www.codeproject.com/KB/cs/"]code project[/URL] | |
Re: Pretty :) The top one looks a little funny on the far left. It looks like the area to the left of the slider knob is a "stop" of some sort. It looks like a block to me. | |
Re: The closest thing you can get realtively easily is [icode]Select Into[/icode] but that won't preserve the entire table setup. What are you trying to accomplish? | |
Re: [code] sk@svn:/tmp$ cat l line 1 line 2 sk@svn:/tmp$ sed -e '1s/$/\r\nmy pattern/g' l line 1 my pattern line 2 sk@svn:/tmp$ [/code] | |
Re: This is a matter of preference. In the beginning you should probably use a typed dataset and databinding to handle your data. This task is possible entirely through the IDE if your SQL tables have already been created, if not then you need to create your tables first. | |
Re: Can you check your logs in /var/log? The httpd might be throwing errors in messages or syslog, and the error_log for apache might give you more information as well. | |
Re: The links DdoubleD posted should explain it, and more than likely if you're asking that question then you don't need a finalizer. The finalizer/destructor gives you one more chance to free up unmanaged resources so they're not leaked. | |
Re: [url]http://lartc.org/howto/lartc.rpdb.multiple-links.html[/url] Google around "Lartc" with traffic shaping, iptables, etc. | |
![]() | Re: Its there... its just hard to see now: [url]http://www.daniweb.com/forums/thread221391.html[/url] ![]() |
I liked the old profile page better because the text was a lot shorter and you could navigate it easier. When i'm posting and think I read a similar post earlier in another forum I open up the users profile page and hit the "Find all threads started by .." … ![]() | |
Re: I am with DdoubleD on needing to see more code. Could you upload a sample project demonstrating the project? | |
Re: Don't use a data adapter for this. Here is the code using Sql* data accessors but you can flip them over to OleDb*, they're more or less identical in calling: [code] public static string BuildSqlNativeConnStr(string server, string database) { return string.Format("Data Source={0};Initial Catalog={1};Integrated Security=True;", server, database); } private void simpleButton1_Click(object … | |
Re: I second Tom's approach. Always use parameterized SQL! A link that may be helpful: [url]http://codebetter.com/blogs/david.hayden/archive/2006/01/05/136264.aspx[/url] | |
Re: It wouldn't download for me... I didn't see a link to dload after I clicked on the link in the post. | |
Re: >> Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. Did you upgrade versions of visual studio? If you do that it creates backup files … | |
Re: Are you fond of that particular encryption method or are you just want any type of encryption? I have a code sample online at [url]http://www.daniweb.com/code/snippet217409.html[/url] with examples of encrypt and decrypt routines. | |
Re: I don't understand what you're asking, could you elaborate? |
The End.