I can make 100 sub-domains as long as using the nameserver of Company A. But If I use the nameserver of Company A, how can I point to the web hosting service in Company B?
Couldn't I use the sub-domain service in Company A while using web hosting service in Company B?
Welcome to WebmasterWorld [webmasterworld.com]!
That all depends on whether the web hosting service will allow you to have multiple subdomains of your domain name.
The name server (DNS) simply translates domain names to IP addresses. Your DNS entry can contain multiple "A records" pointing each of the subdomains to the same, or a different IP address. After retrieving the DNS information, the browser's subsequent requests are then directed to the IP address. As long as your server is configured to accept and sort out the subdomains, there is no problem. You will probably have to have the cooperation of your hosting company, unless they allow you to use multiple subdomains by default. Many only allow "www.example.com" and "example.com", which includes only the single subdomain "www."
Reference: DNS Oversimplified [rscott.org]
HTH,
Jim
Some hosting companies will provide you with as many subdomains as you could possibly use for a one-time setup fee. All of these subdomains would be hosted in the same "user account." You would have to use Apache .htaccess files or IIS control panel or a script to "sort them out" once all the requests to different subdomains arrived in your single hosted account.
Other hosting companies only allow you one or just a few subdomains. Research this question, and you may find a better hosting provider for your needs.
Company A has not tricked you - They are offering to set up multiple DNS records for you. That is all they do, and that is all they claimed to do.
Jim