wwSql::cDefaultLocalServerName

This property allows you to assign the default server name that is used when wwSQL automatically uses the local machine server name if not provided on the connection string.

This value defaults to 127.0.0.1 but can be changed to a specific machine name or - more importantly - to specify a specific protocol and machine name like lcp:127.0.0.1 generically so as to not break existing code.

This specifically refers to the server= part of the SQL connection string if the server is not explicitly provided and replaced for the local machine by default.

Values can be:

  • Plain Machine Name or IP Address
    127.0.0.1 or . or MyServer:1499

  • Protocol Plus Machine Name or IP Address
    tcp:127.0.0.1 or np:. or lpc:127.0.0.1

Configurable Default Value in wconnect.h

A matching WWSQL_DEFAULT_LOCALSERVERNAME in wconnect.h provides the base value which defaults to 127.0.0.1, which allows changing the default server name only making a single code change in wconnect.h. Changing the property requires a code change at each point of use, while the compiler setting only requires a single change in one place. Both require a recompile.

	

Default Value

127.0.0.1