« first day (818 days earlier)      last day (4137 days later) » 

1:00 PM
pmsl?
 
piss my self laughing
 
pissing myself laughing
 
store proceduce of SQL?
ah
 
Yeah, any lol
 
UK?
Where are u?
 
1:00 PM
UK yeah
 
I'm VietNam
So that,My skill english is not good
;)
Hoping it's not mess
 
@Derek Stored procs are just a big chunk of SQL that's saved in a special area of the database that you can call from code and even other bits of sql
 
@BinhTieu Can you help me learn Vietnamese?
 
haha
 
@Sean Thanks dude!
 
1:02 PM
@Derek They just make it easier to do big massive chunks of SQL without having to copy-pasta them all over the place in the code
 
of course
why not?
 
@Derek You can add parameters and all the standard lark to them
 
@BinhTieu Good morning.
Or night
 
@Sean, I need to get some Experience with SQL
 
is there a sharepoint chat?
 
1:03 PM
I hope not
 
@CCInc
 
@Default : hello :)
 
@Derek: Are u sure?
my skype:tieuchanhbinh89dn
 
@Derek It's not as difficult as you would think. I used to bang my head against walls until I read some articles that explained things in the right way. I'm still no expert and am probably considered quite bad (s/SQL/everything) but much better than I was
 
yahoo:boycodon89_dn@yahoo.com
 
1:05 PM
@JamieTownsend I really hope there is..
 
@BinhTieu I was just kidding dude
 
Hello all
 
@userXemY hello
 
@Derek:hihi.Nice to meet you.Are u ussually use facebook?
@Chuki2:Hello
 
@userXemY could you try to comment out the whole method getData and rerun it?
 
1:06 PM
@BinhTieu : How are are you?
 
@Default : I have tried commenting on // initializeload(); on my MainViewModel
@Default ok let me do tat now
 
@Sean, Yeah, I just don't have any exposure to a fully qualified SQl Server, I'll have to maybe setone up at home or summat!
 
@JamieTownsend Well there is.... But there's nobody in it.....
 
@Chuki2:I'm fine,I'm at home.Maybe we talking something this morning at office.;)
 
@BinhTieu No mate, just on here really.
 
1:06 PM
Do you have skype,We can talking something
 
@Derek Yeah just whack SQL Express 2012 on at home
 
@BinhTieu : Hehe... same with me.. we are you come from?
were*
 
yes,VietNam
 
@Default : my whole getdata() method ? or the code inside the getData()
 
my skype:tieuchanhbinh89dn
 
1:07 PM
the code inside
 
May you add it now?
 
@BinhTieu I would suggest not to provide ur personal information :P
 
@BinhTieu : Owh... asean people.. same with me...:)
Me come from Malaysia...
 
@userXemY what does it mean,brother?
 
1:09 PM
@userXemY did you reset the code that you had in your XAML like:<Window.DataContext>
<ViewModel:MainViewModel/>
</Window.DataContext>
 
oh,coooool
Are u online on skype?
 
@Sean will do mate, I'm learning ASP.NET MVC4 and Azure at them moment from home.. when i can
 
@BinhTieu I am right now
 
@BinhTieu I am sister, not brother :P
 
WTF
No way
 
1:10 PM
@userXemY:yes,sorry,Sister.
 
@Default : on getData() it states error for "not all paths return a value "
 
@CCInc:Are u on skype?
 
@BinhTieu Yes, I sent request
but must go soon
so please hurry
 
is it possible to do DataTable table = new DataTable() in initializeload?
 
@CCInc your skype?
 
1:11 PM
that would mean you are not even using the model (which I think is the root to the issue)
 
@Chuki2: Are u there?
 
yup
@Default : I am afraid to do tat
 
afraid of doing what?
 
cos I following the MVVM
 
well, this is debug so we'll change it back later
 
1:14 PM
I did, no errors, direct output but with an empty datagrid :( Sadness
 
no, that's good
 
ok
lets continue then
 
the empty datagrid is because there is no data
because, it's the model that adds the data, right?
Are you using visual studio?
 
yes
I am using VS 2010 enterprise edition
 
now, write the `getData` as this instead:
public DataTable getData()
{
DataTable ndt = new DataTable();
try{
SqlConnection sqlcon = new SqlConnection(con);
sqlcon.Open();
SqlDataAdapter da = new SqlDataAdapter("select top 5 System,Date,Typ,Message,Critical from test_DB.dbo.SystemStatus",con);
da.Fill(ndt);
}
catch (Exception e){
System.Diagnostics.Debug.Fail(e.Message);
}
return ndt;
}
great, if you are using visual studio, you can set a breakpoint in the catch clause
 
1:17 PM
outside the initialiseload() bcos it is void and doent return anything
?
 
nono, the getData method in your model
 
inside my model ? ok cool
 
because now we are sure it's the getData function that is the issue, right?
 
yope bro !
got it
let me do it wait
 
great, and don't forget to change back in the initializeload method.
 
1:20 PM
@Chuki2:Are u ther?
 
@OlegOrlov Yeah that is really vague...
Not something you can teach yourself on the train either
 
@userXemY any progress?
 
I tried what u said, 0 errors but output with empty datagrid
I am pasting my code on gists and send u the link, kindly check it once.. #
 
I have to go now
goodbye
 
@Default : did u look over ?
 
1:30 PM
@userXemY I'll take a look..
 
cool
 
Did you get any exceptions?
Console.WriteLine(e.Message);won't do you any good in a WPF application
Try to use System.Diagnostics.Debug instead and check the Debug output window
what happens if you set breakpoints in the catches in the Model.getData and the initializeload method?
 
I am gonna try now
before that is this ok for my
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
/* var mainWindow = new MainWindow();
var viewModel = new MainViewModel();
mainWindow.DataContext = viewModel;
mainWindow.Show();*/
}
this is my error = The ConnectionString property has not been initialized.
when I set breakpoitn
breakpoint*
 
@userXemY so it's probably the line: SqlConnection sqlcon = new SqlConnection(con);
regarding OnStartup, you can remove that method
all of it
 
u mean all the code inside () ?
 
1:38 PM
the whole OnStartup method
 
it is from my App.xaml.cs
 
yup, you can remove it
 
yes did it =)
I have set my connectionstring n app1.config file
 
hey guys, strange problem here: I've a WindowsForm window that doesn't have the maximize/minimize/close button (which is wanted), now on Windows 7, if I hover over that Window in the taskbar, there is a red X and I can close it. How do I prevent that?
 
@userXemY not sure if the code is the same for WPF or whatever, but this should work assuming you've put it in the right place: using System.Configuration; ........ SqlConnection sqlcon = new SqlConnection(ConfigurationManager.ConnectionStrings["myConnectionStringName"].C‌​onnectionString)
 
1:41 PM
app1.config?
that sounds weird.
shouldn't it be app.config?
if you set a breakpoint on the line SqlConnection sqlcon = new SqlConnection(con); and see what the con string is. Is that valid?
 
@Default : yes I know. but when I did -> ADD -> NEW ITEM-> app file.. by default the name was app1.config
 
@SteffenWinkler You don't... Windows will always let you close applications like that AFAIK
 
ok
 
@SteffenWinkler Applications that have windows anyway
@userXemY See my above comment.
 
@Sean but...I don't want that!
 
1:43 PM
@Sean I have done in a similar way
@Sean let me chk tat way then
 
I've some stuff to do when the user decides to close the program, which is done over a 'Close' button on the form
 
@userXemY If all you've done is stored it in a string and then used that, my way won't change anything
@SteffenWinkler Why not handle the main form's closing event?
 
@Sean that's not the issue. It's the connection string that is invalid, not whether it's inlined or not
 
@SteffenWinkler Then no matter how it's closed, it will always execute that code
 
@sean @default :I have declared as
string con = ConfigurationManager.AppSettings["ConnectionStrings"];
SqlConnection sqlcon = new SqlConnection(con);
 
1:44 PM
When he has it in a local variable he can debug and see what it is. It's much harder if you inline it.
 
@Default Fair enough, that'll teach me for jumping in half way through something =P
 
@Sean I already do that but it doesn't prevent the window from closing :/
 
:)
 
@Default Well not really you just hover over the .ConnectionString part but sure, it's easier to explain
@SteffenWinkler You can cancel the event
 
@Sean ouch, thanks dude!
how does that thing with querying google from here work?
 
1:46 PM
@userXemY do you know how to add breakpoints in visual studio?
@Sean you mean on the sqlcon variable?
 
@SteffenWinkler Yeah when you have the eventargs like so: myForm_FormClosing(object sender, FormClosingEventArgs e) you just put e.Cancel = true;
 
@Default : yes, right click and set breakpoint
 
@Default Well yeah, or the ConfigurationManager.ConnectionStrings["blah"].*ConnectionString* part
 
I have set breakpoints and stepping IN induvidually
 
ok, great. could you set a breakpoint on the following line:
SqlConnection sqlcon = new SqlConnection(con);
 
1:48 PM
bollocks that was supposed to italic the ConnectionString bit, ah well it gets the message across
@SteffenWinkler It depends if people have their bots turned on or not
 
@Default yes doingggg
 
@SteffenWinkler but here, as well as my code up there: stackoverflow.com/questions/2803870/…
@SteffenWinkler and the MSDN docs: msdn.microsoft.com/en-us/library/…
 
@userXemY ok. So, is the con string OK according to you?
 
for (int i = 0; i < table.Rows.Count; ++i)
EventLogData.Add(new EventLog
{
Server = table.Rows[i][0].ToString(),
Date = Convert.ToDateTime(table.Rows[i][1]),
Types = table.Rows[i][2].ToString(),
Messages = table.Rows[i][3].ToString(),
Critical = Convert.ToBoolean(table.Rows[i][4]),
});
this part is keep on iterating when I am stepping in
 
@userXemY set a breakpoint after the loop and F5 it
 
1:49 PM
@Default guess the iteration is the prob.I hope the con string is ok now..
 
it'll jump to the next breakpoint
 
i have also changed App1.config to app.config
@Sean : after the loop ?
 
@Sean thanks. But I fear that might not work. The event is called any time the form is closing. I'd need to only cancel it, when the closing came via that red X
because else, I'd create an infinite loop
 
@SteffenWinkler Check that the object sender is not equal to your closing button then =]
 
@userXemY well, the error message "The ConnectionString property has not been initialized." seems to indicate an issue with the configuration file..
 
1:51 PM
@userXemY yeah so if you have another line after the closing bracket of the loop, set it on that line then F5 it to skip the iteration. Or for next time, hit F10 to step over the loop rather than F11 to step in
 
u mean the app.config ?
 
daamn, i'm so tierd
and sick aswell :(
 
@SteffenWinkler Although that may not work, you would have to check the value of that object from all different angles, e.g. hit your close button and check what it looks like, then use the red x from the taskbar and check it, and from anywhere else you can think of and see what the object actually is
 
ohai @userXemY :)
 
@Maverik wave
 
1:54 PM
@Sean you up for some action tonight? :)
 
@maverik lets play a game, we each set each other excel questions, and hte other one has to answer, then they can ask one back
i go first
 
Lol
 
I have a challenge for you guys!
 
you mean you're never going to ask me any other question then?
 
what did the -- mean in your max formula btw?
 
1:55 PM
@userXemY is this DataTable object?
 
@Derek yupp
 
I have a group of inheriting objects I want to show in a gridview. I only need to show the common properties (which is fine by using BoundFields) but now I need to show the TYPE of object as well
 
datatable object only
 
the formula return True / False... first - (the inner most) forces a cast from bool to int so we get -1 or -0, then the second - negates the resulting int (thus cancelling the negative that we imposed to get it cast) so you're left with 1 or 0
 
oh ok
 
1:57 PM
@Default u mean the app.config ?
 
@Maverik Probably not, no offense, I'm just really into this star wars game atm
 
@userXemY I've been away and caught that end of this lol. Whats the fault?
 
np and why would i be offended lol
 
@ActionHank custom field with the bound value of myObj.GetType().FullName ?
 
i've rediscovered SC2 custom maps
 
1:58 PM
@Maverik Dunno =P
 
we broke up remember :P
you're a free man =p
 
we were together?
 
@Sean Should work, but I'm horrible at c# inside an asp markup page
 
lol weren't we?
 
@Derek : how can I say.. I have a problem with binding the datagrid with a database table using observable colelction
 
1:59 PM
that sora in my lane sure felt togetherly :P
 
Oh right, I see
 
@Derek u can see my code in this link if u r interested social.msdn.microsoft.com/Forums/en-AU/wpf/thread/…
 

« first day (818 days earlier)      last day (4137 days later) »