CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 mssql database connection problem

Print topic Send  topic

Author Message
clubbing80s

Posts: 13
Posted: 08/14/2007, 4:58 AM

Hi
I'm using ms sql express server on windows xp with wamp5, i have edited the php.ini file to include the mssql.dll support, so why am i getting the following errors ...

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: in C:\wamp\www\test\db_mssql.php on line 60
Database error: Cannot connect to mssql Database
MSSQL Error
Session halted.
I have an odbc driver that is used by a php application i hand coded that works fine, so why doesnt it work ?

_________________
Many Thanks
www.linuxpro.co.za
View profile  Send private message
wkempees
Posted: 08/14/2007, 10:26 AM

Because:
Your odbc driver, if used, is only used by CCS during Design time.
Properties->Connections Tab:Design.
If you are able to design grids/recordforms, which from your text I assume
works, then your ODBC driver is OK.
From your error message however I deduct that during testing (F9 F8 Live
Page)
your php installation does not know the correct setup params for mssql
Express.
Properties->Connections Tab:Server
Either it is misconfigured or your php (Wamp) installation is.

Walter

clubbing80s

Posts: 13
Posted: 08/14/2007, 11:34 PM

if i run phpinfo() i get the following for ms sql

MSSQL Support enabled
Active Persistent Links 0
Active Links 0
Library version 7.0

and my odbc / server setting point to the odbc driver name the rest are blank, i have tried putting in the server name and username and password etc .. and didn't get any further ..


_________________
Many Thanks
www.linuxpro.co.za
View profile  Send private message
wkempees
Posted: 08/15/2007, 3:51 AM

Tab:Server setting in Connetctions should not use ODBC but Database flavour
directly.
per field:
PhP Database Library (dropdown) mSQL
Database or Connectionname: Name of the database NOT the ODBC DSN
Host: Localhost
Login and Password, you know them.

That should do it, it tells your generated application how to connect.
Although in some instances the server connecting through ODBC might be
needed, it is not here and speeds up thing by using native connect.

Walter
PS
From your post I cannot deduct if the design time connection works, can you
design grids and forms by picking fields and tables ?
I assume yes, otherwise you would not report the Server problem.

clubbing80s

Posts: 13
Posted: 08/15/2007, 6:56 AM

now I get the following error, wich is a little more positive but not what i was hoping for ..

Database error: Cannot connect to Database: Can't connect to MSQL server on localhost
MSQL Error:
Session halted.

i now have mssql.dll and msql.dll enabled ...

the usernames and passwords are definetly correct . so what else could i have missed ?
_________________
Many Thanks
www.linuxpro.co.za
View profile  Send private message
clubbing80s

Posts: 13
Posted: 08/15/2007, 7:12 AM

Now i have tried connecting to another server with the same database and i get the same error .
Yes the design environment works grate and finds the database and it's structure perfectly, it's just when I use the live page, or try and view it via a web browser that things go south ..

_________________
Many Thanks
www.linuxpro.co.za
View profile  Send private message
wkempees
Posted: 08/15/2007, 11:54 AM

You are nearly there.
I am a MySQL user, so I do not do many mSQL installations.
Someone else might be more helpfull, ultimately as Support.
Is your Database on a networked drive ?
Is php able to connect (outside CCS) to the DB without using ODBC
If and when you can connect through direct php then you will have the right
parameters for CCS too.

Walter

"clubbing80s" <clubbing80s@forum.codecharge> schreef in bericht
news:546c309dc0e28b@news.codecharge.com...
> Now i have tried connecting to another server with the same database and i
> get
> the same error .
> Yes the design environment works grate and finds the database and it's
> structure perfectly, it's just when I use the live page, or try and view
> it via
> a web browser that things go south ..
>
> _________________
> Many Thanks
> www.linuxpro.co.za
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

wkempees
Posted: 08/15/2007, 11:55 AM

Replace 'Localhost' by the database servers name!


"wkempees" <kempe819@planet.nl> schreef in bericht
news:f9vi4v$593$1@news.codecharge.com...
> You are nearly there.
> I am a MySQL user, so I do not do many mSQL installations.
> Someone else might be more helpfull, ultimately as Support.
> Is your Database on a networked drive ?
> Is php able to connect (outside CCS) to the DB without using ODBC
> If and when you can connect through direct php then you will have the
> right parameters for CCS too.
>
> Walter
>
> "clubbing80s" <clubbing80s@forum.codecharge> schreef in bericht
>news:546c309dc0e28b@news.codecharge.com...
>> Now i have tried connecting to another server with the same database and
>> i get
>> the same error .
>> Yes the design environment works grate and finds the database and it's
>> structure perfectly, it's just when I use the live page, or try and view
>> it via
>> a web browser that things go south ..
>>
>> _________________
>> Many Thanks
>> www.linuxpro.co.za
>> ---------------------------------------
>> Sent from YesSoftware forum
>> http://forums.codecharge.com/
>>
>
>

clubbing80s

Posts: 13
Posted: 08/17/2007, 4:08 AM

Hi
I have tried configuring a connection to the database, and that even doesnt work, I have been through most of the examples on php.net and still no luck .. Is there a way to configure ccs so that the code it generates is for odbc only ? other wise i have to find another application to assist with the coding..
_________________
Many Thanks
www.linuxpro.co.za
View profile  Send private message
wkempees


Posts: 1679
Posted: 08/17/2007, 4:58 AM

C80
I understand your mood.
It must be something simple as:
database server name
database is on a networked drive, not on a server.
Some config problem at large.
Please post a Support request, as I am overreaching my expertise here based on your input.
Good luck, please report back.

Quote :
other wise i have to find another application to assist with the coding..
Is like having a italian meal because the chinese restaurant door is sticking.
Italian food is nice but not when your mind is set on chinese.
(meant to put a smile on your face)


_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.