#11  
Old 14th October 2003, 06:16 AM
Rodrigo Gómez [NDX]
 
Posts: n/a
Default Re: Dynamic Creation of NexusDB - Transport error

William,

I do get the error, as you say.

I changed the ConnectServer, like this, and it worked fine:

bool TdbNetworkInit::ConnectServer(void)
{
bool bConnected = false;

/* TStringList *slServers = new TStringList();
GetServerNames(slServers);
if(slServers->Count > 0)
{
for(int Counter = 0;Counter < slServers->Count;Counter++)
{
AnsiString SrvName = slServers->Strings[Counter];
int AtPos = SrvName.AnsiPos("@");
AnsiString Name = SrvName.SubString(1,AtPos-1).Trim().UpperCase();
if(Name.SubString(1,AtPos-1).Trim() == sName.UpperCase())
{
nxwTransport->Enabled = false;
try
{
nxwTransport->ServerName = sName;
nxwTransport->Enabled = true;
bConnected = true;
break;
}
catch(...)
{
bConnected = false;
}
}
}
}
delete slServers;*/


try {
nxwTransport->ServerName = sName;
nxwTransport->Enabled = true;
bConnected = true;
} catch(...) {
bConnected = false;
}

return bConnected;
}


sName is, in my case, NexusDB@192.168.0.4. Testing it with NexusDB, and your
code, produced the error. It seems odd, anyway.

The problem seems to be setting the servername only as the Name part, not
the address. Testing this code with NexusDB as the server name, without the
address, also produces the error. I don't know if this is WAD or a Bug, I
would think it's a bug, as the server was found (or at least setting the
Enabled property didn't generated any exception).

--
Rodrigo Gómez [NDX]
rgomez@msa.sinspam.com.mx
(remove "sinspam." from the address)


"William E. Mahaffey" <wmahaffeyREMOVECAPS@PLEASEsuziessoftware.com>
escribió en el mensaje news:3f8ad7b2@wic040d....
> Rodrigo,
>
> > Could you put a test project in the binaries? I just checked Microsoft

KB,
> > and the 10049 error is WSAEADDRNOTAVAIL, wich probably indicates that

the
> > host is not available. It only happens with the query objects?

>
>
> Done. I am using only SQL so I am not creating any table components. I

am
> using TnxWinsockTransport->GetServerNames to get a list of the NexusDB
> servers so I can connect to the correct server. GetServerNames gives me a
> list of the NexusDB servers running on my network.
>
> I get the error when line
> qMain->Prepare();
> is executed.
>
> Thanks again for your help.
>
>
> "Rodrigo Gómez [NDX]" <rgomezREMOVECAPS@PLEASEmsa.com.mx> wrote in message
> news:3f8ab867@wic040d....
> > Hi William!
> >
> > Could you put a test project in the binaries? I just checked Microsoft

KB,
> > and the 10049 error is WSAEADDRNOTAVAIL, wich probably indicates that

the
> > host is not available. It only happens with the query objects?
> >
> > I don't think it is about the ws2_32.lib file, as you will get linker

> errors
> > if it wasn't being linked.
> >
> > --
> > Rodrigo Gómez [NDX]
> > rgomez@msa.sinspam.com.mx
> > (remove "sinspam." from the address)
> >
> >
> >

>
>



  #12  
Old 14th October 2003, 06:29 AM
Rodrigo Gómez [NDX]
 
Posts: n/a
Default Re: Dynamic Creation of NexusDB - Transport error

Also, you could, instead of assign sName as the servername, assign the whole
name got by the GetServerNames. I guess you use this code to have different
servers in the same network, or something like that. Doing this way should
work.

So, to be precise, instead of assigning sName, assign SrvName.

Also, when comparing Name with sName, you can skip the SubString and Trim,
as Name will already be that way, because the way you created it from
SrvName.

--
Rodrigo Gómez [NDX]
rgomez@msa.sinspam.com.mx
(remove "sinspam." from the address)


"Rodrigo Gómez [NDX]" <rgomezREMOVECAPS@PLEASEmsa.com.mx> escribió en el
mensaje news:3f8ade16$1@wic040d....
> William,
>
> I do get the error, as you say.
>
> I changed the ConnectServer, like this, and it worked fine:
>
> bool TdbNetworkInit::ConnectServer(void)
> {
> bool bConnected = false;
>
> /* TStringList *slServers = new TStringList();
> GetServerNames(slServers);
> if(slServers->Count > 0)
> {
> for(int Counter = 0;Counter < slServers->Count;Counter++)
> {
> AnsiString SrvName = slServers->Strings[Counter];
> int AtPos = SrvName.AnsiPos("@");
> AnsiString Name = SrvName.SubString(1,AtPos-1).Trim().UpperCase();
> if(Name.SubString(1,AtPos-1).Trim() == sName.UpperCase())
> {
> nxwTransport->Enabled = false;
> try
> {
> nxwTransport->ServerName = sName;
> nxwTransport->Enabled = true;
> bConnected = true;
> break;
> }
> catch(...)
> {
> bConnected = false;
> }
> }
> }
> }
> delete slServers;*/
>
>
> try {
> nxwTransport->ServerName = sName;
> nxwTransport->Enabled = true;
> bConnected = true;
> } catch(...) {
> bConnected = false;
> }
>
> return bConnected;
> }
>
>
> sName is, in my case, NexusDB@192.168.0.4. Testing it with NexusDB, and

your
> code, produced the error. It seems odd, anyway.
>
> The problem seems to be setting the servername only as the Name part, not
> the address. Testing this code with NexusDB as the server name, without

the
> address, also produces the error. I don't know if this is WAD or a Bug, I
> would think it's a bug, as the server was found (or at least setting the
> Enabled property didn't generated any exception).
>
> --
> Rodrigo Gómez [NDX]
> rgomez@msa.sinspam.com.mx
> (remove "sinspam." from the address)
>
>
> "William E. Mahaffey" <wmahaffeyREMOVECAPS@PLEASEsuziessoftware.com>
> escribió en el mensaje news:3f8ad7b2@wic040d....
> > Rodrigo,
> >
> > > Could you put a test project in the binaries? I just checked Microsoft

> KB,
> > > and the 10049 error is WSAEADDRNOTAVAIL, wich probably indicates that

> the
> > > host is not available. It only happens with the query objects?

> >
> >
> > Done. I am using only SQL so I am not creating any table components. I

> am
> > using TnxWinsockTransport->GetServerNames to get a list of the NexusDB
> > servers so I can connect to the correct server. GetServerNames gives me

a
> > list of the NexusDB servers running on my network.
> >
> > I get the error when line
> > qMain->Prepare();
> > is executed.
> >
> > Thanks again for your help.
> >
> >
> > "Rodrigo Gómez [NDX]" <rgomezREMOVECAPS@PLEASEmsa.com.mx> wrote in

message
> > news:3f8ab867@wic040d....
> > > Hi William!
> > >
> > > Could you put a test project in the binaries? I just checked Microsoft

> KB,
> > > and the 10049 error is WSAEADDRNOTAVAIL, wich probably indicates that

> the
> > > host is not available. It only happens with the query objects?
> > >
> > > I don't think it is about the ws2_32.lib file, as you will get linker

> > errors
> > > if it wasn't being linked.
> > >
> > > --
> > > Rodrigo Gómez [NDX]
> > > rgomez@msa.sinspam.com.mx
> > > (remove "sinspam." from the address)
> > >
> > >
> > >

> >
> >

>
>



  #13  
Old 14th October 2003, 06:43 AM
Rodrigo Gómez [NDX]
 
Posts: n/a
Default Re: Dynamic Creation of NexusDB - Transport error

No problem. I'm glad it worked.

Anyway, I'll comment with the Nexus team about this, at least to get the
"official" position

Regards,

Rodrigo Gómez

--
Rodrigo Gómez [NDX]
rgomez@msa.sinspam.com.mx
(remove "sinspam." from the address)


"William E. Mahaffey" <wmahaffeyREMOVECAPS@PLEASEsuziessoftware.com>
escribió en el mensaje news:3f8ae1d0@wic040d....
> Rodrigo,
>
> When I go back and change the code in both the test program and the main
> program to add the IP address to the Server Name, every thing works fine.
> This is some code that I was using for FF2 and just modified it for

NexusDB.
>
> Thanks again for all your help.
>
> William
>
>



  #14  
Old 14th October 2003, 01:28 PM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: Dynamic Creation of NexusDB - Transport error

The "official position" is that to connect to a server on an IP address, you
must supply a properly constructed address or DNS name in the ServerName
property. The name you give your NexusDB Server has no direct relation to
either an IP address or a DNS name. Examples that all should work:

192.168.0.1
NexusDB@192.168.0.1
NexusDB.Microsoft.Com


--


Eivind Bakkestuen [NDD]
Please, no email unless requested.
Search Borland and third-party newsgroups here: www.tamaracka.com


"Rodrigo Gómez [NDX]" <rgomezREMOVECAPS@PLEASEmsa.com.mx> wrote in message
news:3f8ae47c$1@wic040d....
> No problem. I'm glad it worked.
>
> Anyway, I'll comment with the Nexus team about this, at least to get the
> "official" position
>
> Regards,
>
> Rodrigo Gómez
>
> --
> Rodrigo Gómez [NDX]
> rgomez@msa.sinspam.com.mx
> (remove "sinspam." from the address)
>
>
> "William E. Mahaffey" <wmahaffeyREMOVECAPS@PLEASEsuziessoftware.com>
> escribió en el mensaje news:3f8ae1d0@wic040d....
> > Rodrigo,
> >
> > When I go back and change the code in both the test program and the main
> > program to add the IP address to the Server Name, every thing works

fine.
> > This is some code that I was using for FF2 and just modified it for

> NexusDB.
> >
> > Thanks again for all your help.
> >
> > William
> >
> >

>
>



  #15  
Old 14th October 2003, 07:51 PM
Rodrigo Gómez [NDX]
 
Posts: n/a
Default Re: Dynamic Creation of NexusDB - Transport error

William,

Eivind remembered some moments ago that, different from FF2, the transport
in Nexus has an active property, that is the one to set to true to actually
connect to the server. Setting enabled to true only allows the Active
property to be true.

I did a simple test setting the name without the ip part, and setting the
"ActiveDesigntime" to true, and it failed, as it should. So, check your code
to assure you're setting Active, not Enabled.

Regards,


--
Rodrigo Gómez [NDX]
rgomez@msa.sinspam.com.mx
(remove "sinspam." from the address)


"William E. Mahaffey" <wmahaffeyREMOVECAPS@PLEASEsuziessoftware.com>
escribió en el mensaje news:3f8ae1d0@wic040d....
> Rodrigo,
>
> When I go back and change the code in both the test program and the main
> program to add the IP address to the Server Name, every thing works fine.
> This is some code that I was using for FF2 and just modified it for

NexusDB.
>
> Thanks again for all your help.
>
> William
>
>



  #16  
Old 14th October 2003, 08:20 PM
Rodrigo Gómez [NDX]
 
Posts: n/a
Default Re: Dynamic Creation of NexusDB - Transport error

> Eivind remembered some moments ago

this should be:

> Eivind remembered _me_ some moments ago


--
Rodrigo Gómez [NDX]
rgomez@msa.sinspam.com.mx
(remove "sinspam." from the address)


  #17  
Old 15th October 2003, 03:17 AM
William E. Mahaffey
 
Posts: n/a
Default Re: Dynamic Creation of NexusDB - Transport error

I will do that,

Thanks again,

William

"Rodrigo Gómez [NDX]" <rgomezREMOVECAPS@PLEASEmsa.com.mx> wrote in message
news:3f8b9d0d@wic040d....
> William,
>
> Eivind remembered some moments ago that, different from FF2, the transport
> in Nexus has an active property, that is the one to set to true to

actually
> connect to the server. Setting enabled to true only allows the Active
> property to be true.
>
> I did a simple test setting the name without the ip part, and setting the
> "ActiveDesigntime" to true, and it failed, as it should. So, check your

code
> to assure you're setting Active, not Enabled.
>
> Regards,
>
>
> --
> Rodrigo Gómez [NDX]
> rgomez@msa.sinspam.com.mx
> (remove "sinspam." from the address)
>
>
> "William E. Mahaffey" <wmahaffeyREMOVECAPS@PLEASEsuziessoftware.com>
> escribió en el mensaje news:3f8ae1d0@wic040d....
> > Rodrigo,
> >
> > When I go back and change the code in both the test program and the main
> > program to add the IP address to the Server Name, every thing works

fine.
> > This is some code that I was using for FF2 and just modified it for

> NexusDB.
> >
> > Thanks again for all your help.
> >
> > William
> >
> >

>
>





Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic setting transport servername on Fast Report Designer? Joao Borges nexusdb.public.support.thirdparty 2 28th February 2004 06:57 AM
Dynamic Creation of NexusDB - Transport error William E. Mahaffey Support Newsgroups 16 15th October 2003 03:17 AM
Dynamic Creation of NexusdB - Transport error William E. Mahaffey Binaries 0 14th October 2003 04:36 AM
Dynamic creation of NexusDB William E. Mahaffey Support Newsgroups 5 8th October 2003 08:42 AM
Dynamic creation of NexusDB William E. Mahaffey nexusdb.public.support.cbuilder 5 8th October 2003 08:42 AM


All times are GMT +11. The time now is 08:13 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.