Home
|
Forums
|
Contact
|
Search
|
Syndication
[login]
[create account]
Friday, November 22, 2024
slxdeveloper.com
Home
Search
Contact us
About slxdeveloper
Syndication
Community
Forums
(NEW!)
Newsletter Archive
Members
Your Profile
Submit Article
General
Administration
(6)
OLE DB Provider
Miscellaneous
(2)
Architect
VBScript
(9)
ActiveX Controls
(6)
How To's
(14)
.NET Extensions
(3)
External
OLE DB Provider
(12)
SLAPI (SlgxApi.dll)
SalesLogix COM
(1)
Web
ASP/ASP.NET
(2)
Web Services
Web Client
Downloads
Samples
(17)
Documentation
(7)
Utilities
(18)
Resources
SalesLogix
(3)
Programming
(1)
11/22/2024 11:55:56 AM
slxdeveloper.com Community Forums
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Architect Forums - ADO General
Forum to discuss ADO specific questions for use with SalesLogix. View the
code of conduct
for posting guidelines.
Forums RSS Feed
Back to Forum List
|
Back to ADO General
|
New Thread
View:
Dynamic
Flat
Tree
Search:
Author
Thread: C# .NET OLEDB DataSets
RJ Samp
Posts: 973
C# .NET OLEDB DataSets
Posted: 07 Aug 07 8:50 AM
How do I convert a String to Integer......Database date to DateTime?
What's the DateTime value for a DbNull?
Not talking DataReader here, but an OLEDB DataSet.
How do you all handle a 50 column dataset with nulls and datatype conversions? Maybe I should COALESCE each field in the SELECT statement of the OLEDBCommand.TEXT?
Thanks
[
Reply
][
Quote
]
Ryan Farley
Posts: 2265
Re: C# .NET OLEDB DataSets
Posted: 07 Aug 07 4:20 PM
To convert the datatype of a value there are several different ways to do so:
ie:
int val = Convert.ToInt32(strval);
or
int val = int.Parse(strval);
or
int val = (int)objval;
If you're working with a strongly-typed DataSet you can use the DbType types represented by the values in each DataRow.
Got a specific question?
[
Reply
][
Quote
]
RJ Samp
Posts: 973
Re: C# .NET OLEDB DataSets
Posted: 07 Aug 07 4:34 PM
Well I saw all of the GetInt32, GetSQLString, GetSQLMoney stuff for the data reader, and didn't see the same stuff for a DataSet.
So when I did an
Int32 Val = (Int32)ds[0] (db column was a Long integer)
int val1 = (int)ds[1] (where the db column was a String)
and it blew up I panicked....
Now I've figured out that long means Int64 so I'll play around with this and get back to you.
THANKS!
[
Reply
][
Quote
]
Page 1 of 1
You can subscribe to receive a daily forum digest in your
user profile
. View the site
code of conduct
for posting guidelines.
Forum RSS Feed
-
Subscribe to the forum RSS feed to keep on top of the latest forum activity!
slxdeveloper.com is brought to you courtesy of
Ryan Farley
&
Customer FX Corporation
.
This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.
code of conduct
|
page cache (param): 11/22/2024 12:16:32 PM