IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1825.68 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-07-31
[22:11]<-- dvxn|syzzzyus xzs>http://www.bagdadsoftware.de")
[22:11]<y-gz>you could yeap
[22:12]<rrd2uppnw>hm
[22:12]<y-gz>it will cast it for you I think
[22:13]<sdnffdxdlld>IConnection con; if(useMySql) con = new MySqlConnection(); else con = new SqlConnection();
[22:13]<y-gz>jaybuffe1: http://shepherdsbush.dcs.hull.ac.uk/wiki/index.php/Main_Page
[22:13]<sdnffdxdlld>it allows you to use any object you wish as long as it impliments that interface
[22:13]<y-gz>jaybuffe1: www.csharpcourse.comeven
[22:13]<y-gz>http://www.csharpcourse.com
[22:14]<y-gz>argh my typing sucks today
[22:14]<sdnffdxdlld>meaning you can have different implimentations that do the same job
[22:14]<kjr>sup smellyhippy
[22:14]<sdnffdxdlld>lo kog
[22:14]<rrd2uppnw>ok.. i guess that makes sense
[22:15]<svlnvnz>different implimentations do different works
[22:15]<svlnvnz>but expose their work in the same way
[22:15]<rrd2uppnw>so im trying to extend IDataReader... how can can access the base methods ? base.whatever doesnt show anything...
[22:16]<sdnffdxdlld>you dont extend an interface
[22:16]<sdnffdxdlld>you impliment it
[22:16]<rrd2uppnw>ok.. implement :-]
[22:16]<sdnffdxdlld>you extend an abstract class
[22:16]<rrd2uppnw>well i was creating an abstract class inheriting idatareader
[22:16]<sdnffdxdlld>an interface doersnt have a base ... it doesnt have any implimentation
[22:19]<rrd2uppnw>so i cant use System.Data.IDataReader to add GetString(string ColumnName_ ?
[22:20]<rrd2uppnw>using SqlDataReader works fine... but that will tie me to a sql database
[22:20]<sdnffdxdlld>no to do that you'd have to add it into the base class
[22:20]<sdnffdxdlld>in c#3 you can do something like that
[22:21]<pzynsv-jp-psy>jaybuffe1 use odbc tehn
[22:21]<pzynsv-jp-psy>smellyhippy stfu
[22:21]<gjrvcxnne>interfaces don't have base methods... an interface is like saying this object will have these functions... so if you know that it's an interface of that interface, those functions can be called
[22:22]<gjrvcxnne>bah, i'm late... awell
[22:23]<svlnvnz>tie to a sql database?
[22:23]<rrd2uppnw>sql server database
[22:23]<rrd2uppnw>which might be ok
[22:23]<rrd2uppnw>but i would rather be as open as possible
[22:24]<svlnvnz>SqlDataReader can be used only on mssqlserver?
[22:24]<sdnffdxdlld>yeah
[22:24]<sdnffdxdlld>the Sql prefix means ms sql
[22:24]<rrd2uppnw>thats what i thought..
[22:24]<svlnvnz>mmm wow all this interface generics abstraction , and .... lol
[22:25]<pzynsv-jp-psy>smellyhippy Does mysqldatareader no inherit from IDataReader?
[22:25]<sdnffdxdlld>no it impliments it ...
[22:25]<y-gz>man
[22:25]<sdnffdxdlld>it doesnt inherit from it ... you inherit from objects
[22:25]<pzynsv-jp-psy>yeah you know what I mean bro
[22:25]<y-gz>one should write a sharpmacs editor
[22:25]<sdnffdxdlld>interfaces are just description of behaviour
[22:25]<pzynsv-jp-psy>I had one too many brandies
[22:25]<sdnffdxdlld>like a contract stateting that this object has these methods and properties
[22:25]<y-gz>so one can do c# / .Net scripting in it
[22:26]<svlnvnz>yes it's really standard in programming also C++ com and almost any oo language have this features
[22:29]<rrd2uppnw>i cant inherit from SqlDatareader either? when i try to build it says The type System.Data.SqlClient.SqlDataReader has no constructor defined
[22:29]<rrd2uppnw>even though my class has its constructor
[22:30]<2gg_>So if the MSDN says "is supported only in version 1.1 of the .NET Framework", does it mean "unavailable below 1.1." or "deprecated above 1.1"?
[22:30]<sdnffdxdlld>unimplimented in 1.0
[22:31]<y-gz>deprecated stuff is mark witht he Obsolete attribute
[22:32]<2gg_>Thanks!
[22:33]<rrd2uppnw>anyone ?
[22:35]<rrd2uppnw> public class bah : System.Data.SqlClient.SqlDataReader {public bah(){}}
[22:36]<sdnffdxdlld>public class bah : System.Data.SqlClient.SqlDataReader {public bah() : base(){}}
[22:36]<sdnffdxdlld>??
[22:36]<sdnffdxdlld>maybe
[22:36]<rrd2uppnw>nope
[22:36]<rrd2uppnw>The type 'System.Data.SqlClient.SqlDataReader' has no constructors defined
[22:37]<sdnffdxdlld>oh yeah the datareader is built by the Command
[22:37]<sdnffdxdlld>you'd have to make your own COmmand object too :/
[22:37]<rxrcr>was gonna say, it definitely has a constructor, it's just private
[22:38]<rxrcr>internal, to be specific
[22:38]<rrd2uppnw>bah.. why can they just have GetString(columnName) and GetInt32(columnName)
[22:38]<sdnffdxdlld>you could make a static method that takes a reader and the string if you really wanted to save on the one lines typing
[22:38]<sdnffdxdlld>jaybuffe1: yeah i think its silly too
[22:38]<sdnffdxdlld>but at the end of the day its only 1 more line
[22:39]<rrd2uppnw>per datacall
[22:39]<sdnffdxdlld>yeah
[22:39]<rrd2uppnw>if imm have a record set with 20 columns returned... and having to do Convert.ToWhater(read["thiscolumn"])
[22:40]<rrd2uppnw>and checking for dbnulls
[22:40]<sdnffdxdlld>reader.GetString(reader.GetOrdinal("ColumnName"));
[22:40]<rrd2uppnw>yeah.. thats what my GetString(string columnName) was going to look like
[22:41]<sdnffdxdlld>ouch!
[22:41]<cjmgrug>how dare you..
[22:42]<sdnffdxdlld>:P
[22:42]<sdnffdxdlld>serves you right
[22:42]<cjmgrug>smellyhippy: quick question : i send NICK, then USER and will i receive something back from the IRC server that i need to respond to?
[22:42]<cjmgrug>oh i'm trying to write an IRC bot
[22:43]<sdnffdxdlld>I use meebys smartirc4net lib
[22:43]<sdnffdxdlld>it handles all that ... i just do the logic ;)
[22:43]<cjmgrug>oh.. sorry i thought you wrote it all from scratch!
[22:43]<sdnffdxdlld>nope hehe far too much work :P
[22:44]<sdnffdxdlld>the irc specs are a bitch too with so much none rfc stuff
[22:44]<cjmgrug>smellyhippy: logic like the spikelite <command> thingy?
[22:44]<cjmgrug>yeah, the RFC's a bastards
[22:44]<cjmgrug>are*
[22:44]<sdnffdxdlld>yeah I just hook into the events and tell the lib what i want it to do
[22:44]<[dam]>too much work?! .. irc is kinda the easiest protocol i've known...
[22:45]<cjmgrug>yea, but great people dont invent the wheel , they just use the damn wheel to invent a car, like smellyhippy :p
[22:45]<[dam]>CodeRun send NICK , USER then USERHOST and let the server say his things..
[22:46]<[dam]>bahhh I prefer doing my IRC class myself...
[22:46]<[dam]>more control over stuff..







