Page 1 of 2 12>
Topic Options
#71304 - 2002-10-30 08:07 PM Edit IP in Sybase client
Anonymous
Unregistered


Is there a way to edit the IP address on win95/98 clients that is located in the Sybase client information. The Sysbase client is used to connect to a remote database. Part of the client config is putting in the IP address of the remomte server.

I would like to do this by group becasue we will be changing our IP addressing soon.

This may be an unusual request but I figured I would give it a shot.

Thank you

Top
#71305 - 2002-10-30 08:28 PM Re: Edit IP in Sybase client
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
well, if it is in the registry or in an ini file, it would be easy.

I suggest you look in the registry for it, and post its location and we can write something up for you.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#71306 - 2002-10-31 02:41 PM Re: Edit IP in Sybase client
Anonymous
Unregistered


Thank you.

The registry key is as follows;
HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\EasylenderConsumerServer

The string value is as follows;
Start "C:\SQLANY50\WIN32\dbclient.exe -c -x tcpip{myip=none;dobroadcast=no;host=10.10.1.10}

What I need to change is just the ip address in the string.

IF you can help that would be awesome.

Top
#71307 - 2002-10-31 02:55 PM Re: Edit IP in Sybase client
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
adagost,

You will probably want to implement some of the followig code -
Replace() - Replaces first or all occurrences of one string with another


HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#71308 - 2002-10-31 03:28 PM Re: Edit IP in Sybase client
Anonymous
Unregistered


With this function replace how does it know which hive key the string is contained in.

I am not sure how to implement this in my environment to just change an ip address.

Thank you

Top
#71309 - 2002-10-31 03:35 PM Re: Edit IP in Sybase client
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, didn't you just point out that it's in HKLM hive?
where all info normally is in win9x
_________________________
!

download KiXnet

Top
#71310 - 2002-10-31 03:37 PM Re: Edit IP in Sybase client
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
First of all, the function only deals with a string. It has nothing to do with the registry. You read the ValueData into a string, replace the substring and then write the ValueData back.

Second, please use the proper terminology for the the registry items. Do not confuse Keys with ValueNames and ValueData. See the FAQ:

Topic: Registry
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#71311 - 2002-10-31 05:30 PM Re: Edit IP in Sybase client
Anonymous
Unregistered


In my original post I indicated it was in the HKEY_LOcal_Machine hive.

Can I still use kix to make the edit to the string contained within this hive??
Thank you

Top
#71312 - 2002-10-31 06:44 PM Re: Edit IP in Sybase client
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
If you can tell me what part of "You read the ValueData into a string, replace the substring and then write the ValueData back" you don't understand, I could elaborate.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#71313 - 2002-10-31 07:11 PM Re: Edit IP in Sybase client
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
But I don't want to read a ValueData, I want to read a registry key!

Jens ducks, and waits for Les to explode [Big Grin]
_________________________
There are two types of vessels, submarines and targets.

Top
#71314 - 2002-10-31 08:23 PM Re: Edit IP in Sybase client
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
(chrunch, crunch, crunch) as Les chews on a couple more Rollaids...

There was another thread where the user said they didn't have time to read the manual...

I think the post count on that one topic alone was over 20, the manual has 100 pages. Some of the information in the 20+ posts are dubious, all 100 pages of the manual are pertinent and accurate. No time to read the manual?

Somebody once said to me "I don't have time to do it right". If you can't find the time to do it right then where will you find the time to do it over?

Stupid IS forever...
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#71315 - 2002-10-31 08:46 PM Re: Edit IP in Sybase client
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Les: You're preaching to the choir.

I think both the KiXtart Manual and the FAQ Forum should be required reading before a new member is allowed to post here. I know, radical approach [Wink]
_________________________
There are two types of vessels, submarines and targets.

Top
#71316 - 2002-10-31 08:50 PM Re: Edit IP in Sybase client
Anonymous
Unregistered


I have read the manual that comes with the download. It is not very detailed. It gives a lot of the commands but some of them have no detail.

If there is another manual you are speaking of please let me know where to find it.

Thank you

Top
#71317 - 2002-10-31 08:56 PM Re: Edit IP in Sybase client
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Please name one KiXtart Command/Function/Macro that does not provide any detail or even insufficient details. And also name the KiXtart (Manual) version that you are referring to.

We could then notify the developer to enhance the description of said Command/Function/Macro
_________________________
There are two types of vessels, submarines and targets.

Top
#71318 - 2002-10-31 09:01 PM Re: Edit IP in Sybase client
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
adagost,
My last post was not directed at you... 'twas just a knee-jerk reaction to Jens trying to get my goat.

I need for you to clarify some of the terminology before I can dispense any more advice. Did you read my FAQ?
You said:
{snip}
The registry key is as follows;
HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\EasylenderConsumerServer

The string value is as follows;
Start "C:\SQLANY50\WIN32\dbclient.exe -c -x tcpip{myip=none;dobroadcast=no;host=10.10.1.10}
{/snip}

So what is the ValueName that holds the value string (ValueData) you specify? Without the ValueName I cannot proceed.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#71319 - 2002-11-01 02:16 AM Re: Edit IP in Sybase client
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
adagost,
Also, the string you provided seems to be incomplete. Should there not be a second " in there?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#71320 - 2002-11-01 05:55 AM Re: Edit IP in Sybase client
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
adagost,

We (Les, Rad, Jens, etc.) could throw a script together and post it up for you to take away. In other words, use resources and put together information. Put another way, we want you to learn.

When we say to RTFM, use FAQ UDF Sections.. Utilize Search features to look for specific things:

Registry
Replace
String
Read
Write

I think one of the most important exercises I went through was to dig into the sample scripts that Ruud was so kind to provide. Start with the TEST.KIX..

Before we get off too much of a tangent here...

Let's "boil the broth off of the soup" and see what we have?

Like I was taught in Management, we need to break things into bite-sized chunks.

(1) What is the goal?
Read in a Registry string, change it and replace.

(2) How do we do this?
We need to replace a string and add it back in to the registry.

(3) Testing and execution.
  • What is our environment? NT/W9x, Kixtart version, etc.
  • Will the users have rights to do this?
    Does it break? Do we need some SLEEP statments?
So, taking this we can put together the following..
  • Reading a value from the Registry, how do we do that?
    READVALUE
  • Wait.. We need to test to see if the value is what need otherwise RETURN.. Use a string Function like INSTR to do so.
  • How do use that for our operations? Assign it a value?
  • Great, we now have a value we read in from the registry.. Now what? Let's use the Replace UDF listed..
  • With the resulting variable from the Replace UDF, write the value back to the registry.
Does this help lay out the gameplan a bit better?
Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#71321 - 2002-11-01 08:48 AM Re: Edit IP in Sybase client
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
as looking to the thread...
I think it actually is whole bunch of values thus making the whole contents of a key.

so, must ask:
what the valuenames are?
_________________________
!

download KiXnet

Top
#71322 - 2002-11-01 05:40 PM Re: Edit IP in Sybase client
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Jooel,

Trawling through the posts we find it is a REG_SZ and is:
quote:

Start "C:\SQLANY50\WIN32\dbclient.exe -c -x tcpip{myip=none;dobroadcast=no;host=10.10.1.10}

From what he is asking for, he wants to change 10.10.1.10 to something like 10.10.32.10.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#71323 - 2002-11-01 05:47 PM Re: Edit IP in Sybase client
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
actually it might be:

myip from xxx to none
dobroadcast from xxx to no
host from xxx to 10.10.1.10
_________________________
!

download KiXnet

Top
Page 1 of 2 12>


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 920 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.151 seconds in which 0.11 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org