Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

benglish72

@benglish72
About
Posts
38
Topics
16
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • 70cm of snow in the Aussie Alps
    B benglish72

    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.

    The Lounge question

  • Getting table names from a database
    B benglish72

    Hi, 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.

    Database database question

  • Getting table names from a database
    B benglish72

    Hi, 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.

    Database database question

  • Ouch!
    B benglish72

    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.

    The Lounge help

  • Ouch!
    B benglish72

    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.

    The Lounge help

  • Quick bit field question
    B benglish72

    Cool, thanks heaps! "Ergo huffabo et puffabo et tuam domum inflabo" ait magnus malus lupus. "Non per comam men-men-menti!" ait porcellus.

    C# question csharp c++

  • Quick bit field question
    B benglish72

    Hi, 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.

    C# question csharp c++

  • Space in table name problem
    B benglish72

    Hi, 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.

    C# help question

  • Space in table name problem
    B benglish72

    Hi, 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.

    C# help question

  • Space in table name problem
    B benglish72

    Hi, 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.

    C# help question

  • Serious Action outside&#8230;
    B benglish72

    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.

    The Lounge data-structures

  • Updating access file
    B benglish72

    Hi, 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.

    C# database help tutorial question announcement

  • Updating access file
    B benglish72

    Hi, 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.

    C# database help tutorial question announcement

  • Getting table names from .mdb
    B benglish72

    Hi, 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

    C# database help question

  • Getting table names from .mdb file
    B benglish72

    Hi, 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.

    Database question csharp help

  • Getting table names from .mdb
    B benglish72

    Hi, 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.

    C# database help question

  • File sharing query
    B benglish72

    :-D Hey Dave, thanks, that worked a treat! Good stuff.

    C# csharp database question

  • File sharing query
    B benglish72

    Hi, 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) { }

    C# csharp database question

  • For you Aussies
    B benglish72

    Typical, another Kiwi impersonating an aussie...:~

    The Lounge html com question

  • St Patricks Day
    B benglish72

    :-D Go Bob!

    The Lounge
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups