|
I'm creating a dataset with the following code:
DataSet m_xmlData = new Dataset("Modules");
m_xmlData.Clear();
m_xmlData.ReadXml("thisfile.xml");
I've got this much code written to retrieve the data from the dataset:
int tableCount = m_xmlData.Tables.Count;
for (int i = 0; i < tableCount; i++)
{
DataTable dt = m_xmlData.Tables[i];
if (dt.TableName != "Module")
{
continue;
}
int rowCount = dt.Rows.Count;
for (int j = 0; j < rowCount; j++)
{
DataRow row = dt.Rows[j];
}
}
At this point, I'm kinda stuck I've looked around on CP but I've not been able to find any references to READING data from the dataset. I tried tracing in with the debugger to try to find out where to drill down, but I guess I'm just missing it.
Any help?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Use
myrow[int] to read the value of a field based on its ordinal position
and
myrow[string] to read the value of a field based on its name
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Yup - I was allowing intellisense to lead me astray.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: I was allowing intellisense to lead me astray
And there was the problem - intellisense. There's no sense in intellisense.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I have made a vb.net project and I used SQL Server Express for my database..
The project (when built and installed) can't be used remotely. But it can be installed, for example, on 2 computers. But what I need to do is to just share the database on my SQL server from the 1st computer to the 2nd.
This is because if I change the information inside the database from the 1st computer, the 2nd computer can also view the same database as the 1st one for them to acquire the same information from the database.
My question is.. Can I share my Database even if I'm using SQL Server 2005 Express Edition?
How will it be possible?
|
|
|
|
|
Any know why I can't log on to a SQL Server on a Windows 2003 machine, using Windows authentication, from my Vista machine. If I remote desktop onto the server I can, so I know my account is valid in SQL.
-- modified at 9:18 Friday 9th November, 2007
|
|
|
|
|
I have Vista, Sql management studio, and I can connecto to my win2003 / Sql Server. Sure its not another problem? Maybe Remote Connections not allowed on the server, this is maybe why you can login in remote?
|
|
|
|
|
I can log in remotely using SQL Server authentication.
|
|
|
|
|
Brady Kelly wrote: remotely
Brady Kelly wrote: If I remote desktop onto the server I can
Remote connections or remote desktop? Did you enabled remote connections on the server?
|
|
|
|
|
Try a XP machine insteed of the Vista to clear it depends on Vista.
I guess Vista is "to secure" to allow you to connect (Firewall, networking, Rights).
Greetings from Germany
|
|
|
|
|
Verify that you have logged onto the domain and not just onto the Vista machine.
|
|
|
|
|
how i make a gloabl Variable As @@language?
123
|
|
|
|
|
AFAIK, you can't define your own global variables.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
SVb.net wrote: how i make a gloabl Variable As @@language?
Nope. You can't do it. These variables are defined by Microsoft.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi all,
I got a security problem here,
let's say I got a SQL Report Server, with browser URL : //rptserver/reports
I have datasource1 as datasource
I also have provide a model (RptModel1) that created from datasource1 using Visual Studio
I want to enable users to use Report Builder , using available model(RptModel1) but restrict them from regenerate model from datasource1.
So, how to secure that datasource?
I need your help,Please...
Thanks in advance
|
|
|
|
|
Is there something wrong in my question so no one understand it? Or maybe there's no solution for my problem? :->
|
|
|
|
|
Is there any command which is equivalent to sequence in Oracle.
Or some thing to no the rows.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
It depends on the type of database. Under SQL-Server you can use:
create table MyTable (
Id integer identity(1,1),
OtherData varchar(10)
)
go
insert into MyTable (OtherData)
values ('hello')
select SCOPE_IDENTITY() as AllocatedNumber
go Regards
Andy
|
|
|
|
|
In Oracle , we can use the following statement
Create table MyTestTable (Select * from OriginalTable)
Such that a new table will be created from the original table and the values will be inserted to it.
But what is the equivalent for the same in SQL Server.
Can any one suggest me.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
|
But I don't know the columns I am going to retrieve based on the specification given by the user, I have to retrieve the data and that has to be stored to the table. So the table must be a temporary table with a key value which is auto generated.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
I know this is dealing in ancient technology, but MS Access hasn't yet breathed its last. I copy an mdb template to a temp mdb file, write stuff to the copy using an OleDbConnection, and then close the connection. Next, I want to rename the file, but I can't. The ldb file is still there and I get the error that the file is being accessed by another process. I can copy the file to the new name, but I can't rename or delete the file.
Really aggravating is that this doesn't happen when the finished mdb file is under some size threshold. Then, the ldb goes away immediately when the connection is closed.
I've tried connection.Dispose(); connection=null; OleDbConnection.ReleaseObjectPool(); GC.Collect(); None of those release the process lock on the file. It won't release until my application terminates, which is a bit too late.
Is there any help for this?
|
|
|
|
|
Can anyone here help me please and tell me how can i establish a DATA connection in C++, that work with OLE DB?
I would like from my C++ Programm(Visual Studio 2005)to connect the MS SQL Server 2005 through OLE DB, but i do not have any idea how to do this, this field is new for me.
I istalled already MDAC 2.8, which it contains the OLE DB, and furthermore i can not do any thing, i do not even what is the next step is. Do i have MDAS 2.8 or not ?
I searched the whole day in the Internet, but without any success. What could help me is a small applicable example in C++, that describes how can i make a connection how can i inquire(call) the DB.
Another thing, should i set somthing in the Comp. or install somthing else?
Can anyone help me please or tell me where i can find the acquired information?
Regards in Advance
FreeEagle
|
|
|
|
|
If you continue to attempt to use this site DO NOT CROSS POST
|
|
|
|
|
Hi,
I am using Access 2003 and I can't seem to find out what is wrong with my INNER JOIN. There are 2 foreign keys in my Customer table namely TitleId and RegionId.
Here is my code:
SELECT t.TitleId, t.TitleName, c.CustomerId, c.FirstName, c.LastName, c.Mobile, c.Email, r.RegionId, r.RegionName
FROM Customer c
INNER JOIN Title t ON c.TitleId = t.TitleId
INNER JOIN Region r ON c.RegionId = r.RegionId
WHERE c.CustomerId = intCustomerID;
The error is:
Syntax error (missing operator) in query expression 'c.TitleId = t.TitleId INNER JOIN Region r ON c.RegionId = r.RegionId'.
Please can someone advise.
Regards
|
|
|
|