Went to Baw Baw last w'end. Bloody hard as rock, got bruises all over. I thought snow was soft? Anyway, I may sound terribly bad, but I'm just really poor at skiing. The real problem was other poor skiers felt the need to use me as a brake instead of learning how to stop themselves (mainly one of my brothers and a niece!)...........:-D "Ergo huffabo et puffabo et tuam domum inflabo" ait magnus malus lupus. "Non per comam men-men-menti!" ait porcellus.
benglish72
Posts
-
70cm of snow in the Aussie Alps -
Getting table names from a databaseHi, I seemed to have solved it using SQLTables() function....Thanks anyway. "Ergo huffabo et puffabo et tuam domum inflabo" ait magnus malus lupus. "Non per comam men-men-menti!" ait porcellus.
-
Getting table names from a databaseHi, I'm using ODBC to query a database that can be selected by the user at runtime. This query "SELECT * FROM MSysObjects WHERE Type = 1 AND NOT Name LIKE 'MSys%'" will return a list of table names fine, but unfortunately, persmissions on the ACCESS DB must be set to ADMIN for this query to succeed. Is there another way to get table names from a DB without having to first alter persmissions? or is there a programatic way to alter permissions? Thanks. "Ergo huffabo et puffabo et tuam domum inflabo" ait magnus malus lupus. "Non per comam men-men-menti!" ait porcellus.
-
Ouch!Hi, I didn't mean to be insulting, but I think you misunderstand what the words state, nation and country mean. To whit: country = A nation or state. http://dictionary.reference.com/search?q=country The dictionary says this, many words have varied meaning in context, I didn't mean to imply a lessening of the words value, just joking around with meanings. "Ergo huffabo et puffabo et tuam domum inflabo" ait magnus malus lupus. "Non per comam men-men-menti!" ait porcellus.
-
Ouch!Unless I'm mistaken, Canada is a state as much as the US is (a state being a country, yes, the U.S. is a federation of States, that agree to let federal gov. do the business of dealing with the world and cohession)... Or similar in the case of Australia, a federation of states... or maybe I shouldn't have gone to the Gomez concert last night, lots of interesting smelling cigarettes..........but was amazing..... :-D From dictionary.com State: - A body politic, especially one constituting a nation: the states of Eastern Europe. <- Canada would qualify as a state here :D Sorry, just had to be a pedant. "Ergo huffabo et puffabo et tuam domum inflabo" ait magnus malus lupus. "Non per comam men-men-menti!" ait porcellus.
-
Quick bit field questionCool, thanks heaps! "Ergo huffabo et puffabo et tuam domum inflabo" ait magnus malus lupus. "Non per comam men-men-menti!" ait porcellus.
-
Quick bit field questionHi, how do I extract values from a bit field in c#? I tried it a la C++ if(flag.value & enum.value) { } but it wouldn't let me go that way, thought it was boolean or something odd. Anyway, I've had a quick look thru previous posts (takes a bloody long time to load pages!) but forgive me if it's been covered. Thanks, Brian. "Ergo huffabo et puffabo et tuam domum inflabo" ait magnus malus lupus. "Non per comam men-men-menti!" ait porcellus.
-
Space in table name problemHi, that suggestion of yours worked great, I'd just put it in after the necessary place in the code. Thanks heaps. "Ergo huffabo et puffabo et tuam domum inflabo" ait magnus malus lupus.
-
Space in table name problemHi, thanks, it's not my data file, so I can't control the use of spaces. I've tried wrapping it in square brackets, but it still throws an exception and seems to ignore the part of the name after the space, also does this if I replace the space with an underscore, quite weird. "Ergo huffabo et puffabo et tuam domum inflabo" ait magnus malus lupus.
-
Space in table name problemHi, when I try to read in data to a dataset and the table name has a space in it, I get an exception that the table doesn't exist. For some reason, only the part of the table name up to the space is recognised. Do I need to escape the space in a special way or try some other method? Thanks. ...code.... String sTable = "Table space". dataAdapter.File(dataSet,sTable); //exception here...., tries to load "Table" "Ergo huffabo et puffabo et tuam domum inflabo" ait magnus malus lupus.
-
Serious Action outside…Yes, and no, they are an introduced species, so I'm all for culling cats, feral ones anyway, the others should be teased on a regular basis. :-D But the culling should be done in a humane way. "Ergo huffabo et puffabo et tuam domum inflabo" ait magnus malus lupus.
-
Updating access fileHi, here's some code, it basically removes unwanted characters that may be in string fields in a table, then tries to save the changes to the table. I've tried a few different variations, but none seem to work. Either I get an exception or it seems to work, but the file is unchanged. Thanks. statusBar.Text = "Cleaning "+sDataFile+"..."; if(m_dataSet!=null) { m_connection.Open(); Int32 iCount = m_dataSet.Tables["table"].Rows.Count; for(Int32 i=0;i>; if(sChanged.CompareTo(sItem)!=0) { iChanges++; statusBar.Text = "Cleaning "+sDataFile+" - Number of Changes: "+iChanges.ToString(); m_dataSet.Tables["table"].Rows[i].ItemArray[iIndex]=sChanged; } } } m_dataSet.Tables[sTable].Rows[i].EndEdit(); } } if(m_dataSet.HasChanges(DataRowState.Modified)==true) { DataSet dataChanged = m_dataSet.GetChanges(); m_dataAdapter.Update(dataChanged,sTable); m_dataSet.AcceptChanges(); } m_connection.Close(); } } "Ergo huffabo et puffabo et tuam domum inflabo" ait magnus malus lupus.
-
Updating access fileHi, sorry if this has already been asked, but I've had a quick look and not seen anything similar. I don't have time to research at the moment and work never waits... Basically, I make changed to rows in a dataset, and I want to update the access file that the data comes from. I've tried the DataSet.GetChanges, but when I call the OleDbDataAdapter.Update() is chucks a wobbly and says I need an update string. But I don't know the field names, nor do I want to. It already knows the difference, else the GetChanges would've failed, how to I get to update the changed rows without me having to construct an SQL update statement? I have tried to construct it, but it's a bit difficult when you don't know the field names, etc. Thanks for any help. Brian. "Ergo huffabo et puffabo et tuam domum inflabo" ait magnus malus lupus.
-
Getting table names from .mdbHi, here's a code snippet of what I'm trying to do, but it throws an exception when I try to fill the dataset. I'm not familiar enough with .NET database stuff to know if this is the right way to go about it. Any ideas? Thanks. DataSet myDataSet = new DataSet(); string strAccessConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+ dataFile; string strAccessSelect = "SELECT Name FROM MSysObjects WHERE Type = 1 AND Name LIKE 'MSys%'"; try { OleDbDataAdapter myDataAdapter = new OleDbDataAdapter (strAccessSelect,strAccessConn); myDataAdapter.Fill(myDataSet,"MSysObjects"); DataTableCollection dta = myDataSet.Tables; Int32 iCount = dta.Count; for(Int32 i=0;i
-
Getting table names from .mdb fileHi, I tried the c# forum, but this might be better. How do I programatically get table names from a .mdb file? There doesn't seem to be a way. I'd like to be able to open any .mdb file, read in the list of tables, etc. Thanks for any help or tips. Brian.
-
Getting table names from .mdbHi, I'm trying to find a way to get the names of tables in a .mdb file programmatically. The OleDBDataAdapter requires that you use an SQL select statement, but that's a bit hard if you don't yet know the table names in a file. Any help, tips? Thanks, Brian.
-
File sharing query:-D Hey Dave, thanks, that worked a treat! Good stuff.
-
File sharing queryHi, I'm writing a program that attempts to open a file stream using FileInfo.OpenRead(), this seems to fail when another application is accessing the same file. As I need to be able to read this file whilst another has it open or access it, is there anyway I can get it to open instead of throwing IOException in C#? Thanks. Here's a code snippet //check file exists System.IO.FileInfo info = new System.IO.FileInfo(sFileName); if(info!=null&&info.Exists==true) { //ok, file exits, lets read it in... try { System.IO.Stream stream = info.OpenRead(); //do stuff here stream.Close(); } catch(IOException exception) { }
-
For you AussiesTypical, another Kiwi impersonating an aussie...:~
-
St Patricks Day:-D Go Bob!