For Programmers: Free Programming Magazines  


Home > Archive > Clarion > December 2006 > port number in MSSQL driver connection string









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author port number in MSSQL driver connection string
efranchib@gmail.com

2006-12-11, 6:57 pm

Is there any way to include the port number on the connection string
using MSSQL -not ODBC- driver?



Here's my example:
lConnString = CLIP(GLO:SQL_Server) & ';' &|
'UID=' & CLIP(GLO:SQL_UID) & ';' &|
'PWD=' & CLIP(GLO:SQL_PWD) & ';' &|
'WSID=' & CLIP(GLO:SQL_ServerWISD) & ';' &|
'DATABASE=' & CLIP(GLO:SQL_DB)

I've trying to use "Servername,Portnumber" as server name
(Glo:SQL_Server) but then the connection is refused and the Login
Screen is shown prompting for valid entries.
(Anything after the comma is considered user id)

I would appreciate any help

PhilM

2006-12-19, 9:17 am

quote:
Originally posted by efranchib@gmail.com
Is there any way to include the port number on the connection string
using MSSQL -not ODBC- driver?


Yes, but the slightest error results in access denied. Make sure you include all the pieces (make sure the spaces are in there):
Provider=SQLOLEDB;Persist Security Info=False;User ID=yourid;Pwd=youpwd;Initial Catalog=databasename;Data Source=yourwebsite.com,61712;
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com