![]() ObjCMD.CommandText = "Exec dbo.proc_xml 1394" ObjConn.Open "Provider=SQLOLEDB server=mydb Database=Development " & _ Set xmpCustomMap = ActiveWorkbook.XmlMaps("triangle_Map") I anyone has a better solution I welcome it. This is to automate 30+ complex reports in excel (must be excel - and no iis available to make my job much easier!). I have an xml datastream and would like to know the syntax to map the contents to a specific excel worksheet and xml map. O'DonnellĬan't manage to P/Invoke that Win32 API in. "If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." - Joseph E. If anything just returneing USER_NAME() for the SCHEMA_NAME and SCHEMA_OWNER is just pointless. I don't see anywhere in this where filters anything by permission. a_cha -charset/1001, not sortorder.ĪND a_cha.id = convert(tinyint, DatabasePropertyEx(db.name, ' sqlcharset')) ,a_cha.name as DEFAULT_CHARACTER_SET_NAME ,convert(sysname, NULL) as DEFAULT_CHARACTER_SET_SCHEMA ![]() ,convert(sysname, NULL) as DEFAULT_CHARACTER_SET_CATALOG Identifies schmata owned by current users, databases current users has permissions in I don't know if this helps explain the situation more clearly.Īs an aside the code for INFORMATION_SCHEMATA is: It is correct that it issues an error if I try to USE the 'p1_p2_destination_database' but I want to trap that situation before it arises. ![]() All 'fails_2' has in the server is access in the 'master' and 'p1_p2_source_database', it also owns a table in 'p1_p2_source_database'. 'fails_2' is the user that is not supposed to be able to access that particular database (These are part of the tests I am running to ensure the stored procedure that I am writing behaves correctly for a given situation). If I then issue a USE command I get the following:ĩ16: Server user 'fails_2' is not a valid user in database 'p1_p2_destination_database'. If I SELECT * FROM INFORMATION_SCHEMA.SCHEMATA it tells me that the schema owner is the same as the user logged in for a database that that user cannot access. This is not useful as it still list the database that I cannot access. When I run the statement you gave, SELECT CATALOG_NAME FROM INFORMATION_SCHEMA.SCHEMATA, I get a list of all the databases. Actually I find that the INFORMATION_SCHEMA is quite eccentric in what it returns (see end note). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |