606 Posted Topics
Re: Not all drivers and software will work. It might be safe to say that most will, but just depends. By now there should be updated drivers for Vista for most products, just check before you update. | |
| |
Re: as long as the dns can resolve the hostname you can use the name in place of 'localhost' as well, this way if the ip ever changes it will still resolve to the correct address | |
Re: you are mixing static with singleton here try this way [code] public class GlobalVariables { private static readonly GlobalVariables TheSingleGlobalVariableInstance = new GlobalVariables(); private GlobalVariables() { } public static GlobalVariables Instance { get { return TheSingleGlobalVariableInstance; } } private int result6; public int Result6 { get{ return result6; } set … | |
Re: and just to supplement anteka, in case you are having trouble reading it from the database [code] SqlCommand cmd = new SqlCommand("select imagecolumn from tablename where id = 1"); SqlDataReader dataReader = cmd.ExecuteReader(); byte[] imageBytes = (byte[]) imageReader.GetValue(0); MemoryStream ms = new MemoryStream(imageBytes); FileStream fs = File.OpenWrite(imagePath); fs.Write(ms.GetBuffer(), 0, ms.Position()); … | |
Re: CSS is only in asp.net, well web-based, but you know what i mean If you want the same look and feel for everything, use inheritance for all your custom controls and use those in your application If you are really into using css, here's a pseudo-css for winforms [url]http://www.codeproject.com/KB/miscctrl/StylesSheetManager.aspx[/url] | |
Re: this will loop through all the values in your array IEnumerator basically means you can use it to iterate your data lets say you have 1, 5, 3, 8 in your array this will print out 1 5 3 8 | |
Re: here's a link on a small little sample i did for that [url]http://alleratech.com/blog/post/Sharing-data-between-forms-with-C.aspx[/url] | |
Re: try specifying the size of the memory stream, are you also sure stringtobytearray is doing what it should? [code] Dim ms As New MemoryStream(obj, 0, obj.Length) [/code] | |
Re: Not really Its good practice to handle the exceptions as they occur and decide if you can move on or pass back a specific error message Here is an example of what you might be looking for though [url]http://stackoverflow.com/questions/337702/c-how-to-implement-one-catchem-all-exception-handler-with-resume[/url] | |
Re: try this its unclear why you are using string text as a parameter if its not being passed on, but here it is [code] void delegate textCallback(string text); public void ThreadProcSafe2(String text) { if (this.m_AllKnownDevicesFrm.InvokeRequired) { this.m_AllKnownDevicesFrm.Invoke(new textCallback(ThreadProcSafe2), text); } else { switchPanels(1); } } [/code] | |
Re: add an extra variable called shown [code] private bool shown = false; private void button1_Click(object sender, EventArgs e) { firstName = "Tom"; lastName = "Lee"; popup(); } private void button2_Click(object sender, EventArgs e) { firstName = "Peter"; lastName = "Green"; popup(); } void popup() { if(!shown) { shown = true; … | |
Re: Prices.Add(2.0); This only appends to your list, this does not so called 'add' or sum them together for the sum you need to use a foreach or enumerator as you had before, and increment sumValue | |
Re: there are other ways you could do this, but here's one [code=sql] select CAST(Reference AS INT) as REFERENCE from tablename [/code] | |
Re: What type of collation is this? run this [code=sql] SHOW FULL COLUMNS FROM assign2; [/code] | |
Re: you can compile c from command line, just use the same from c# the redirectstandardoutput will allow you to get the output that would be displayed as well [code] Process proc = new Process(); proc.StartInfo.FileName = "compiler name"; proc.StartInfo.RedirectStandardOutput = true; proc.Start(); string output = proc.StandardOutput.ReadToEnd(); [/code] | |
Re: I would suggest you to take a shot at it and say what tables and columns you have for now, as far as normalization goes I have done a similar design recently for basketball, here is the basic concept lowercase - tables uppercase - columns teams TEAM_ID TEAM_NAME DISTRICT_ID district … | |
Re: you have this in here INNER JOIN stop ON stop.stopcompletiondatetime = jobhistory.modifieddt which will not work, because stopcompletiondatetime does not equal your modifieddt | |
Re: Add an additional parameter for your id, this will return the newly inserted record's id, otherwise if it failed an exception will be thrown and you don't need to check for its existence [code] CREATE PROCEDURE CreateWebsiteMember ( @wbmName varchar(50), @ID int OUTPUT ) AS Insert into tblWebsiteMember (wbmName) values … | |
Re: in management studio you can use object explorer, open your database (expand), go to programmability right click on stored procedures and click new stored procedure you can also do it manually by this [code] create procedure ProcedureName as BEGIN ... do the work here END [/code] | |
Re: Is it in the maintenance plan or a schedule task to do so? My advice would be to create a maintenance plan to create the backup, and a scheduled task to compress it and ftp it I don't understand completely where the problem is residing | |
Re: you can just use a '+' (plus sign) if they are two string fields i added a space in between the fields as well [code] select db1.dbo.customer.technote + ' ' + db2.dbo.customers.notes as FULL_NOTE --put the rest in here [/code] | |
Re: use formatting [code] //you set your data here decimal numValue = 20.0000; //format it here string num = String.Format("{0:C}", numValue); this.textbox.Text = num; [/code] | |
Re: The exe is the compiled solution, all exes have already been compiled as well if you are in a winforms app, it needs to be compiled before running it, if you are in asp.net you can set the project not to be built until specifically build the project if your … | |
Re: [code] select p.ID, (SELECT SUM(i.IncomeAmount) from Income i where i.PersonId = p.ID) AS INCOME_AMOUNT, (SELECT SUM(o.OutcomeAmount) from Outcome o where o.PersonId = p.ID) AS OUTCOME_AMOUNT from Person p [/code] | |
| |
Re: you can use something like this [code] int port = 8000; String ipAdd = "192.168.100.5"; int timeout = 1000; SocketAddress sockAddr = new InetSocketAddress(ipAdd, port); Socket s = new Socket(); s.connect(sockAddr, timeout); [/code] | |
![]() | Re: This may not be of any assistance, but just in case. I have move pretty much all sql server's to virtual pc with no problem and think its a much better solution than having a separate dedicated machine a lot of cases. I'm assuming vmware is the same case, hope … |
Re: i wouldn't suggest adding an additional column necessarily, but creating a view, that way, your duration will always be in sync with the columns [code] select USER_ID, START_TIME, END_TIME, DATE_DIFF(second, START_TIME, END-TIME) AS DURATION_SEC FROM InternetAccess [/code] depending on what you need, you can sub in minute, hour, or second … | |
Re: i'm not quite sure what you are trying to do here, but there are 2 things first you are referencing R3 outside of its scope, second you have a where instead of an and, here is my shot at what i think you are trying to do [code] select * … | |
Re: [code] System.Diagnostics.Process.Start("calc") [/code] | |
Re: Just to be sure and check all sides of the problem I noticed: [code] this.txtStatus.Text + "\r\n" + text; [/code] if its a one line textbox you won't be able to see the output, for testing purposes, try changing it to this [code] this.txtStatus.Text = text; [/code] also be sure … | |
Re: Are you sure you set the column's data type to datetime? It sounds like you are using varchar | |
Re: are you trying to create viewstate? if so, what front end language are you using? | |
Re: would adding a trigger that will format the field to only be characters upon inserts and updates be sufficient? | |
Re: add a where clause for where str = 'jon' or str like ('jon %') notice the space after jon | |
Re: of course, the same as you would any other property [code] public int[] LendMoney { get{return lendMoney;} set{lendMoney = value;} } [/code] Might want to use an arraylist instead, if its not a fixed length | |
Re: I would suggest something like that you would want to be an exception rather than event Create an exception class and do a check before passing the value to the numeric control and throw an exception if out of bounds | |
Re: well lets start with this what is the connection string? | |
Re: from the ui we get a filepath [code] string filePath = this.textBoxPath.value; //We call our class like this from the ui BusinessLogic logic = new BusinessLogic(filePath); logic.Load(); [/code] we'll pass it into the business logic through a constructor [code] public class BusinessLogic { private string filePath; public BusinessLogic(string filePath) { … | |
Re: how about this [code] public static void main [/code] | |
Re: take a look at this line [code] rs.Fields("CITA") = Val(Me.TextBox14.Text) [/code] change to [code] rs.Fields("CITA").value = Val(Me.TextBox14.Text) [/code] | |
Re: you are trying to do an inner join on something that isn't there, all users don't have posts unlike javamedia, i would suggest trying to use inner or outer joins, at least to me it makes life much easier try this, think it should work [code] select count(*) as post_count, … | |
Re: Yes, here is a good link to set the collation for many collation codes [url]http://www.serverintellect.com/support/sqlserver/change-database-collation.aspx[/url] | |
Re: Read the file into a byte array, pass the byte array to the webservice, assuming thats what you are using, either way though, then save the file back out into the filesystem using a streamreader | |
Re: a couple possible options is dependent on how you are accessing your data if lets say you are looping through ids and running a select on each id, then that is very inefficient as far as the amount of database calls, i don't know your data structure, nor would i … | |
Re: The problem with windows service as LizR has stated is security. Services are started up as different user accounts, than the logged on user, although they can be set with the logged on user. I think you are thinking about the application in the wrong context trying to get it … |
The End.