Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
samadhi
Newbie


Joined: 29 Jan 2003
Posts: 2
Location: United Kingdom

PostPosted: Tue Sep 23, 2003 11:16 pm   

Case Sensitive Mapquery
 
Does anyone know if it is possible to do a case sensitive map query, the help says that the command is like standard SQL, which in the case of Oracle IS normally case sensitive.

The problem is that when I search for a location such as 'in the forest' I also get returned locations 'In the forest' and 'In The Forest' as these have also all been entered as valid locations within the map.

This means that it then takes a lot longer looking through the list of possible options to find the desired location wasting valuable killing time Very Happy

Regards,

Samadhi
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Sep 24, 2003 7:48 pm   
 
Hmm, not sure what you mean by "Map query"? Are you taking about a function, or are you talking about the Find Room dialog?

The fields in the Find Room dialog use the LIKE SQL operator, which I believe is designed to be case insensitive on purpose.

If you mean the %mapfilter function, that argument is sent directly to the Microsoft ADO database Filter, so it would depend upon the database. zMUD uses the Jet OLEDB, which is the MS Access 2000 database engine, so it's not necessarily the same as Oracle.

Unfortunately, even though SQL is *supposed* to be standard, it is not. There are many detailed differences between the underlying database engine.
Reply with quote
samadhi
Newbie


Joined: 29 Jan 2003
Posts: 2
Location: United Kingdom

PostPosted: Wed Sep 24, 2003 10:34 pm   
 
I was referring to the #MAPQUERY command. I have tried using the = operator to match the rooms as well, however this still seems to be case insensitive. Does anyone know if there is a way to perform a case sensitive SQL query.

If not it looks like it might be time to try and work out how I can use %mapfilter to achieve what I am after.

Regards,

Samadhi
Reply with quote
Private
Adept


Joined: 10 Jan 2002
Posts: 264
Location: USA

PostPosted: Sun Jun 12, 2005 9:15 am   
 
#ALIAS mapfind {#VARIABLE conn %comcreate( "ADODB.Connection")
#CALL @Conn.Open( "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\zmud\aardmud\maps\Aardwolf.mdb")
#IF (@conn.ConnectionString ="") {
#SHOW "could not open connection to database"
#ABORT
}
#VARIABLE rs @conn.Execute( %concat( "SELECT * FROM ObjectTbl o, ZoneTbl z WHERE INSTR(1,o.name,'%-1',0)=1 and o.zoneid = z.zoneid ORDER BY z.name, o.name"))
#CALL @rs.MoveFirst
#WHILE (not @rs.eof) {
#ECHO %ansi( white)Area:%ansi( default) @rs("z.name") %ansi( white)Room:%ansi( default) @rs("o.name")
#CALL @rs.MoveNext
}
#CALL @rs.Close
#CALL @conn.Close
conn = ""
rs = ""}

CaSe SeNsItIvE exact match search, Source= must point to your map database file

What i wanna know is how to refer to the other fields...
o.name
z.name
etc
etc????
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net