Dies ist eine statische Kopie unseres alten Forums. Es sind keine Interaktionen möglich.
This is a static copy of our old forum. Interactions are not possible.

Scirocco81

Zuhörer

  • "Scirocco81" is male
  • "Scirocco81" started this thread

Posts: 3

Date of registration: Dec 13th 2005

1

Tuesday, December 13th 2005, 9:27am

mssql_query(): BIG PROBLEM

Ich bekomme folgende Fehlermeldung:
mssql_query(): supplied argument is not a valid MS SQL-Link resource
in ....

quelltext ist folgender:

Source code

1
2
3
4
5
	$poll_result = mssql_query($poll_dbName, "SELECT * FROM $poll_descTableName"); 
	if(!$poll_result)
	{
		echo mssql_errno(). ": ".mssql_error(). "<br>";
		return;

brauche dringend hilfe

Scirocco81

Zuhörer

  • "Scirocco81" is male
  • "Scirocco81" started this thread

Posts: 3

Date of registration: Dec 13th 2005

2

Tuesday, December 13th 2005, 9:36am

RE: mssql_query(): BIG PROBLEM

hab hier noch ne meldung:

Warning: mssql_query(): supplied argument is not a valid MS SQL-Link resource in *****.php on line 91

Fatal error: Call to undefined function mssql_errno() in *****.php on line 94


vielleicht hilft es ja weiter zur behebung

maffe

Unregistered

3

Tuesday, December 13th 2005, 12:02pm

Müsste das erste Argument nicht eine Verbindungskennung sein und kein Datenbankname? Oder heißt die Variable bloß schlecht?

// Edit: Andersrum :P Einfach mal die Doku lesen ...

This post has been edited 3 times, last edit by "maffe" (Dec 13th 2005, 12:03pm)


Scirocco81

Zuhörer

  • "Scirocco81" is male
  • "Scirocco81" started this thread

Posts: 3

Date of registration: Dec 13th 2005

4

Tuesday, December 13th 2005, 12:45pm

hier ist der quelltext der davor noch steht:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
// connect to database
	if($poll_usePersistentConnects == 0)
		$poll_mssql_ID = mssql_connect($poll_mssql_host, $poll_mssql_user, $poll_mssql_pwd);
	else
		$poll_mssql_ID = mssql_pconnect($poll_mssql_host, $poll_mssql_user, $poll_mssql_pwd);

	// select all descriptions
	$poll_result = mssql_query($poll_dbName, 'SELECT * FROM $poll_descTableName'); 
	if(!$poll_result)
	{
		echo mssql_errno(). ": ".mssql_error(). "<br>";
		return;

This post has been edited 1 times, last edit by "Scirocco81" (Dec 13th 2005, 12:45pm)


dfex

Junior Schreiberling

  • "dfex" is male

Posts: 248

Date of registration: Dec 11th 2001

5

Tuesday, December 13th 2005, 3:26pm

Wir hatten das übrigens schonmal:
http://forum.finf.uni-hannover.de/thread…1&hilight=mssql

Mir ist das Problem auch dunkel bekannt. Ich glaube, das hatte etwas mit dem Betriebsystem auf dem Webserver zu tun (auf dem das Script ausgeführt wird). Bei MS Windows gabs da einen Sonderfall zu beachten.
Bin mir aber nicht mehr sicher und find auf die Schnelle auch nix ..

maffe

Unregistered

6

Tuesday, December 13th 2005, 6:51pm

mixed mssql_query ( string Anfrage [, resource Verbindungs-Kennung [, int batch_size]] )

Die Parameter sollen's sein, und auch in der Reihenfolge :)

This post has been edited 1 times, last edit by "maffe" (Dec 13th 2005, 6:53pm)