Re: Fwd: Re: Help connecting with tds to MSSQL 2008 - problem found
Frediano Ziglio <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
We don't use raw sockets, only ip ones (udp/tcp). freddy77 2010/9/21 Gal Rubinstein <[email protected]> > Hello all, > > the after looking into the socket problem it accrued to me that I forgot to > mention an important fact, I'm using windows 7. > RAW sockets have been limited on this version of windows! > > http://msdn.microsoft.com/en-us/library/ms740548(VS.85).aspx<http://msdn.microsoft.com/en-us/library/ms740548%28VS.85%29.aspx>< > http://msdn.microsoft.com/en-us/library/ms740548%28VS.85%29.aspx> > > on a different site ( > http://cs.baylor.edu/~donahoo/practical/CSockets/practical/<http://cs.baylor.edu/%7Edonahoo/practical/CSockets/practical/>< > http://cs.baylor.edu/%7Edonahoo/practical/CSockets/practical/>) a > different socket connection method is used, using connect(). > the function called is :int connect(int socket, const struct sockaddr* > addr, int addrlen) > > since I'm quite a beginner in C++, can anyone add this alternative to the > net.c source, maybe surround it with a #ifdef. > > Thanks a lot... > > PS: cant wait to move to linux with this project, only after we show a WIN7 > version can we move on... damn! > > -------- Original Message -------- > Subject: Re: [freetds] Help connecting with tds to MSSQL 2008 > Date: Mon, 20 Sep 2010 22:20:30 +0200 > From: Gal Rubinstein <[email protected]> > To: Andrew H. Wakefield <[email protected]> > CC: [email protected] > > > > On 9/20/2010 7:24 PM, Andrew H. Wakefield wrote: > >> G >> al, it sounds like you are having trouble getting the basic connectivity >> going. Panos is right: the first step is to test using tsql, which should be >> included as one of the utility apps. This will let you check to see that you >> have your parameters correct. You can connect directly to a given IP address >> and port, or you can connect using a server described in the freetds.conf >> file. >> >> Grace & peace, >> >> Andy Wakefield >> >> /Andrew H. Wakefield/ >> /Dean and Professor of New Testament and Greek/ >> /Lewis Edward and Martha Barnes Tyner Professor of Bible/ >> /Campbell University Divinity School/ >> /P. O. Drawer 4050/ >> /Buies Creek, NC 27506/ >> /910-893-1830/ >> /[email protected] <mailto:[email protected]>/ >> >> Please consider the environment before printing this email. >> >> -----Original Message----- >> *From*: Panos Stavroulis <[email protected] <mailto: >> Panos%20Stavroulis%20%[email protected]<Panos%2520Stavroulis%2520%[email protected]> >> %3e>> >> *Reply-to*: FreeTDS Development Group <[email protected]> >> *To*: Gal Rubinstein <[email protected] <mailto: >> Gal%20Rubinstein%20%[email protected]<Gal%2520Rubinstein%2520%[email protected]> >> %3e>> >> *Cc*: [email protected] <mailto:[email protected]> >> *Subject*: Re: [freetds] Help connecting with tds to MSSQL 2008 >> *Date*: Mon, 20 Sep 2010 14:19:28 +0000 (GMT) >> >> I haven't started using freetds yet but I think you can use the tsql >> utility to see if you can actually connect to SQL Server. Also check your >> configuration file freetds.conf if your sql server has correct name etc. I >> am far from being called an expert in freetds, so maybe someone else knows >> better... >> >> Panos. >> >> --- On Mon, 20/9/10, Gal Rubinstein<[email protected] <mailto: >> [email protected]>> wrote: >> >> > From: Gal Rubinstein<[email protected] <mailto:[email protected]>> >> > Subject: Re: [freetds] Help connecting with tds to MSSQL 2008 >> > To: "Panos Yahoo"<[email protected] <mailto: >> [email protected]>> >> > Cc:[email protected] <Cc%[email protected]> <mailto: >> [email protected]> >> > Date: Monday, 20 September, 2010, 14:49 >> > On 9/20/2010 3:41 PM, Panos >> > Yahoo wrote: >> > > Your boss should be more open minded sorry! You can >> > use c++ within .net that's your best chance for a easy and >> > reliable application plus productive developers. >> > > >> > > >> > > Panos >> > > -------------------- >> > > sent from my mobile >> > > >> > > -----Original Message----- >> > > From: Gal Rubinstein<[email protected] <mailto:[email protected]>> >> > > Sent: 20 September 2010 13:21 >> > > To: Panos Stavroulis<[email protected] <mailto: >> [email protected]>> >> > > Cc:[email protected] <Cc%[email protected]> <mailto: >> [email protected]> >> > > Subject: Re: [freetds] Help connecting with tds to >> > MSSQL 2008 >> > > >> > > On 9/20/2010 1:35 PM, Panos Stavroulis >> > wrote: >> > >> Hi, >> > >> >> > >> Can I ask you why you need freeTDS if you your >> > client is a windows server? Why are you not using .NET ADO >> > native drivers? Just use the standard microsoft .net >> > connectivity which should be faster as well, at least in >> > theory. Then use the .NET language of your choice, I would >> > go with C#. >> > >> >> > >> Panos. >> > >> >> > >> --- On Mon, 20/9/10, Gal Rubinstein<[email protected] <mailto: >> [email protected]>> wrote: >> > >> >> > >>> From: Gal Rubinstein<[email protected] <mailto:[email protected]>> >> > >>> Subject: [freetds] Help connecting with tds to >> > MSSQL 2008 >> > >>> To:[email protected] <To%[email protected]> <mailto: >> [email protected]> >> > >>> Date: Monday, 20 September, 2010, 11:44 >> > >>> Hello all. >> > >>> >> > >>> I have a an SQL server 2008 installed with >> > default values >> > >>> on local machine (my pc). >> > >>> >> > >>> I'm trying to connect using libTDS.lib but I >> > cannot seem to >> > >>> get the parameters right. >> > >>> >> > >>> the debugger shows that I reach the >> > ling >> > >>> "tdsdump_log(TDS_DBG_ERROR, "Server %s not >> > found..." >> > >>> meaning that the server was not found. (yes, >> > daaa!). >> > >>> >> > >>> I'm very new to Sql Servers, so, please, >> > help me >> > >>> out. >> > >>> >> > >>> Thanks, >> > >>> Gal >> > >>> >> > _______________________________________________ >> > >>> FreeTDS mailing list >> > >>> [email protected] <mailto:[email protected]> >> > >>> http://lists.ibiblio.org/mailman/listinfo/freetds >> > > thank you for the replay, >> > > >> > > The reason is that that my boss says no to .NET, and, >> > the client is >> > > already written in native c++. >> > > >> > > can you help me with this? >> > > >> > > Thank you, >> > > Gal >> > > >> > I understand that, but, for the time being, can anyone >> > help? >> > I'm not trying to change my Boss, I'm trying >> > to finish this so I can get payed (like all of use, >> > right?), >> > so, can anyone help me with this? >> > >> > in any case, we wrote this project in standard c++, nothing >> > specially >> > for MS. because the might like to migrate to Linux, and >> > then, >> > the whole .NET thing is out of the question... right? >> > >> >> >> >> _______________________________________________ >> FreeTDS mailing list >> [email protected] <mailto:[email protected]> >> http://lists.ibiblio.org/mailman/listinfo/freetd < >> http://lists.ibiblio.org/mailman/listinfo/freetds> >> > as afar as I can tell, from debugging, libTDS fails to open a socket.: > net.c, > at the line: if (TDS_IS_SOCKET_INVALID(tds->s = socket(AF_INET, > SOCK_STREAM, 0))) {..... > > as for tsql, do you know of a windows version? > > ps: here is the dump: > log.c:190:Starting log file for FreeTDS 0.65 > on 2010-09-20 22:05:11 with debug flags 0x4fff. > config.c:172:Getting connection information for [GAL-PC:1433]. > config.c:176:Parsed servername, now GAL-PC on 1433. > config.c:181:Attempting to read conf files. > config.c:310:... $FREETDSCONF not set. Trying $FREETDS/etc. > config.c:323:... $FREETDS not set. Trying $HOME. > config.c:253:Found conf file 'c:\freetds.conf' (default). > config.c:398:Looking for section global. > config.c:455: Found section global. > config.c:458:Got a match. > config.c:479: tds version = '4.2' > config.c:479: dump file = 'c:\temp\freetds.log' > config.c:479: timeout = '10' > config.c:479: connect timeout = '10' > config.c:479: text size = '64512' > config.c:455: Found section gal-pc. > config.c:469: Reached EOF > config.c:398:Looking for section GAL-PC. > config.c:455: Found section global. > config.c:455: Found section gal-pc. > config.c:458:Got a match. > config.c:479: host = '127.0.0.1' > config.c:508:Found host entry 127.0.0.1. > config.c:512:IP addr is 127.0.0.1. > config.c:479: port = '1433' > config.c:479: tds version = '7.0' > config.c:469: Reached EOF > config.c:257:Success: [GAL-PC] defined in c:\freetds.conf. > config.c:558:tds_config_login: client_charset is ISO-8859-1. > config.c:195:Final connection parameters: > config.c:196: server_name = GAL-PC > config.c:197: port = 1433 > config.c:198: major_version = 7 > config.c:199: minor_version = 0 > config.c:200: block_size = 0 > config.c:201: language = us_english > config.c:202: server_charset = > config.c:203: connect_timeout = 10 > config.c:204: client_host_name = > config.c:205: app_name = my_app > config.c:206: user_name = test > config.c:209: library = TDS-Library > config.c:210: bulk_copy = 0 > config.c:211: suppress_language = 0 > config.c:212: encrypt level = 0 > config.c:213: query_timeout = 10 > config.c:216: client_charset = ISO-8859-1 > config.c:217: ip_addr = 127.0.0.1 > config.c:218: instance_name = > config.c:219: database = > config.c:220: dump_file = c:\temp\freetds.log > config.c:221: debug_flags = 0 > config.c:222: text_size = 64512 > config.c:223: broken_dates = 0 > config.c:224: broken_money = 0 > config.c:225: emul_little_endian = 0 > > _______________________________________________ > FreeTDS mailing list > [email protected] > http://lists.ibiblio.org/mailman/listinfo/freetds >