|
The DataTable class lives inside a namespace of System.Data
Try creating an untyped DataTable in code manually to see if it recognizes the object successfully without errors. If it does, then the problem lies elsewhere...
Daniel Minnaar
.NET Solutions Architect
|
|
|
|
|
I need to know how to get the column names of a database. I want to offer my users the ability to choose a database from a list of databases and then have them select what columns they want. I want to know how to get the column names and store them in a combobox. Does anyone know how to do this or where I can find an article? Thank you.
|
|
|
|
|
This is from something I wrote a while back for checking the structure of an Access table, it might be of some help to point you in the right direction:
Dim tblExport As DataTable<br />
Dim TableName as string = "tblTest"<br />
tblExport = TestConnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, TableName, "TABLE"})
|
|
|
|
|
The Microsoft SQL Server equivalent is:
SELECT syscolumns.name
FROM syscolumns INNER JOIN sysobjects ON syscolumns.id = sysobjects.id
WHERE sysobjects.name = ''
Daniel Minnaar
.NET Solutions Architect
|
|
|
|
|
Unless specific server takes the default,
That specified in the settings of your computer?
Fulvio
|
|
|
|
|
Member 1996543 wrote: Unless specific server takes the default,
That specified in the settings of your computer?
Uhhh... what? Your question makes no sense and there isn't enough information to even guess at what you're trying to get at.
|
|
|
|
|
But that was an excellent answer anyway Dave
Daniel Minnaar
.NET Solutions Architect
|
|
|
|
|
when the windows logon comes i should show my application before coming desktop how
|
|
|
|
|
You can't show it 'before' the desktop. You can run it on startup, many different ways.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have the following If statement
bmi = weight/(height * height)
If bmi < 18.5 then
Response.Write("Your underweight")
Else If bmi >= 18.5 And bmi <= 24.9 then
Response.Write("Your normal")
Else If bmi >=25 And bmi <=29.9 then
Response.Write("Your overweight")
Else
Response.Write("Your obese")
End If
But keep getting this error:
Microsoft VBScript compilation (0x800A03F6)
Expected 'End'
I know that this means that it is expecting the if statement to end which when i look at it it is closed. I'm new to programming and sleep depravation is probably causing me to over look the minor detail. If any one can spot where i'm goin wrong it's much appreciated.
Thanks
|
|
|
|
|
The correct syntax is ElseIf
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
|
Mc--Gann wrote: bmi >=25 And
there is a logical error in your code, what if bmi equals 24.95?
solution: you should drop all the >= conditions
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I am working a visual basic program that I would like to start at either restart, or a users selected time.
I am new at programming, I have yet to figure out how to launch a program automatically, currently I use
the task scheduler to launch it on my pc, can any one aid in assistance.
|
|
|
|
|
Task Scheduler is about it.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
What access modifier would I use so that:
Functions within the class have read and write access to the subject &
Anything external has read-only access?
Many thanks with this stumping question,
Fahad Sadah
|
|
|
|
|
Marking a method as Private means it can only be accessed by code within the current class.
Marking a method as Friend means it can only be accessed by code within the current assembly.
Hope this helps.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Since .NET 2.0 C# supports properties with different access modifiers for thet get and the set
part, so you could have a public get and a private set. Not sure how it is in VB.NET tho.
If it is not available, you can always make your own public Get and private Set methods!
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
There is get and set in VB.NET
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Paul Conrad wrote: There is get and set in VB.NET
Yes Paul, I am aware of that, but what I don't know is whether they can have different
access modifiers, as was introduced in C# 2.0
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I think they can. But, I could be wrong.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Very informative.
Or need I something to decrypt?
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Luc Pattyn wrote: Very informative.
Sorry
Luc Pattyn wrote: need I something to decrypt?
Nope. No rijndael or anything like that. Just opening up VS right now to see if it can be done...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Thanks everyone, trying it now!
EDIT: Works perfectly! THANKS!
|
|
|
|
|
Can i get some good interface design of medical shop application.
Thankyou,
Yesu
|
|
|
|