all groups > dotnet ado.net > january 2008
Filter by week: 1 2 3 4 5
Total newbie, getting error "Reference to a non-shared member requires an object reference."
Posted by doofy at 1/31/2008 2:05:26 PM
I'm trying to jump start with VB.Net/Ado.Net to get something done at
work.
I'm using the book "Programming Microsoft ADO.Net 2.0". One problem
with this book is that his sample code does not spell out the imports.
Usually somewhere in the paragraphs or pages before, it says "This
assume... more >>
Data table export to CSV?
Posted by Smokey Grindel at 1/31/2008 10:55:12 AM
Is it possible to export a single (not related to anything else) data
table's contents to a CSV file? I have XML export working fine, but they
want the files in CSV format.. thanks!
... more >>
How do I stop VS2005 from backward-quoting identifiers on update statements?
Posted by Heinz Kiosk at 1/31/2008 4:16:47 AM
I'm using the VS2005 wizard/design tool for generating typed
datatables and adapters for a desktop application. At design-time I
point the development environment at an MSJet database, but I've been
careful to make all of the queries that I add to the adapters generic
SQL which should work again... more >>
Oracle connection Fails
Posted by Saquib at 1/31/2008 3:24:05 AM
Hi All,
I have built a simple .Net console application. In which i am trying
to connect to the oracle database by using Oracle data provider
for .Net from ORACLE site and it works fine on my machine. I have
installed the same on my main server but when i run this application
from Our main ser... more >>
Programmatically create Access 2007 database
Posted by 68756E746572@gmail.com at 1/31/2008 12:35:41 AM
Greetings...
From this:
http://support.microsoft.com/default.aspx?scid=kb;en-us;317881
article I've knew how to create access 2000 databases. But what with
2007?
Best regards...... more >>
Insert c# DateTime object to Oracle Table using OleDbDataAdapter
Posted by jh at 1/31/2008 12:28:31 AM
I have a table defined as:
create table product_price
(
productId int,
price number(20,10),
price_date date,
primary key (productId)
);
I am reading through a price file in c# and I would like to insert a row
into the table for every price+date+productId combination. I am... more >>
Trouble Using DataAdapter.Update()
Posted by ccrookston at 1/30/2008 10:22:01 PM
Hi, and thanks in advance for any help :-)
From a high level, heres what I'm trying to do. I have a flat comma
delimited file that I need to import into a database, but after some of the
data is massaged and mingled with data in the destination table. So, I first
import the flat file data... more >>
Inserting records from one database into identical table in another datrabase
Posted by BillE at 1/30/2008 4:57:32 PM
Hi!
I'm transferring the records in a table from one database to another.
I create a data adapter using a connection from the first database to fill a
dataset.
I add an InsertCommand with a different connection to the second database,
and add the necessary parameters.
I hoped that when... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
SQL CLR Sproc isn't running right
Posted by Smokey Grindel at 1/30/2008 2:12:39 PM
I have a stored procedure for SQL Server 2005 which is done with the CLR...
when its executed as a admin it works. when its executed as a non-admin it
doesn't work... any ideas? the user has permission to execute the procedure
on the server... seems to be something with the .NET SPROC's that i... more >>
list box primary key vb .net
Posted by mcotter@frontiernet.net at 1/30/2008 7:14:59 AM
Does anyone know how to populate a list box using SqlDataReader. I am
using VB .NET 2005. Along with the list box value that is visible I
need it's primary key value that is not visible.... more >>
Error Messages?
Posted by Jonathan Wood at 1/29/2008 12:23:57 PM
Currently, I tend to return @@ERROR in my stored procedures so that the
calling code can test for error conditions. But I'm wondering: When @@ERROR
is non-zero, is there a way for ADO.NET to detect any specific error
messages?
Thanks.
--
Jonathan Wood
SoftCircuits Programming
http://... more >>
Can't save renamed DataColumn
Posted by nvx at 1/29/2008 7:28:48 AM
Hello.
I experience a problem with columns in a DataSet. I need to add,
remove, and rename columns in one table. I'd like to avoid changing
the columns, but unfortunately I can't.
The table is bound to a DataGridView. Adding and removing columns is
not a problem, this works perfectly. The pro... more >>
Calling a stored procedure with a output parameter
Posted by kkbullen@yahoo.com at 1/29/2008 5:45:36 AM
I've been testing a stored procedure that has an output parameter.
When I add parameters to the sqlcommand this way, the output parameter
returned is always what I pass in:
With InsertLeg
.Transaction = mySQLTrans
.CommandType = CommandType.StoredProcedure
.Parameters.A... more >>
TransactionManagerCommunicationException when transaction is escalated
Posted by Alex R at 1/28/2008 2:44:58 PM
Hello,
I have an application which uses the System.Transactions.TransactionScope
class to manage transactions. Transactions are often escalated to
distributed transactions, and normally this works fine. With one particular
installation I have a problem where as soon as the transaction is ... more >>
Problem using DbProviderFactory with a Access 2000 database
Posted by Gordon at 1/28/2008 9:35:01 AM
Hi;
I can't seem to open an Access 2000 database with the following dbprovider
factory code :
In my source :
Code SnippetDim dp As String = ConfigurationManager.AppSettings("provider")
Dim cnStr As String = _
ConfigurationManager.ConnectionStrings("AFIDConnectionString").Connec... more >>
Displaying Data Table Queries
Posted by jp2msft at 1/28/2008 8:57:02 AM
I have several basic queries that seem to add up to a very intricate query.
I need to create a report to display the results of these queries, but I
don't know the best way.
The old VB5 program this new application is replacing wrote the document in
a very painful, line-by-line format to a... more >>
dataset error
Posted by AVL at 1/28/2008 4:58:03 AM
Hi,
I've a requirement where in I need to read the data from a csv file and
load the data into the sql database. The file has around 1 lakh records. I'm
reading 300 records at a time from the file, loading into a dataset.
From the dataset, I'm reading the rows sequentially,and updating one b... more >>
Size of Table
Posted by Husam at 1/27/2008 4:56:00 AM
Hi EveryBody:
How much data can be saved in the tabel in the database ?
In another way can the size of table be 100 GB ?
any help will be appreciated
regard's
Husam... more >>
Recommended db app strategy
Posted by John at 1/27/2008 1:38:13 AM
Hi
I have an access backend database to which I need to give a vb.net front
end. I created db connection and data source in vs 2008., I then dragged the
fields onto a form which created the app for me. The app works ok but my
question is; is this the correct/acceptable way to cerate an app ... more >>
Moving from recordsets to datasets...
Posted by hurricane_number_one@yahoo.com at 1/26/2008 10:56:36 PM
Been writing VB6 for years and am now getting up to speed with .NET.
In VB6 I used to create classes for each logical grouping of tables,
then have a recordset in that class for each table. Then I'd have
functions that would populate the different recordsets. I had a
function like this: "getRe... more >>
Re-added row
Posted by nvx at 1/25/2008 2:35:42 PM
Hello there,
I need an advice on "re-adding the deleted rows" in a DataTable. The
situation is as follows:
1. I have a data-bound DataGridView.
2. User wants to delete a row with a key value "KEY", therefore this
row gets deleted using
DataRow row = dataSet.Tables["data"].Rows.Find("KE... more >>
Calling DataAdapter.Update() on disposed DataSet?
Posted by Carlo Razzeto at 1/25/2008 11:28:12 AM
Hey,
Some one gave a new developer of ours a project to make sure our core
library funcitons are properly cleaning up resources (that's a good thing!),
but I had consernse about one thing the developer was doing which sparked a
debate with my co-worker.
Some of these functions were retur... more >>
Using Visual Studio Queries
Posted by jp2msft at 1/25/2008 10:53:00 AM
In my C# project, I have a Data Set called Employee and an
EmployeeTableAdapter.
The EmployeeTableAdapter created a "Fill,GetData()" Query for itself, and it
uses this to display data to my DataGridView. The properties of the Fill
Query are:
CommandText = SELECT ...
CommandType = Text
... more >>
oleDB hangs on ExecuteNonQuery
Posted by jimj at 1/25/2008 9:30:00 AM
The line insertStatus = cmdInsert.ExecuteNonQuery() is hanging; although the
INSERT is working, because after I kill the application, I can see the new
row.
The OLE DB provider is set to IBM DB2 UDB for iSeries IBMDA400 OLE DB
Provider.
Private Function VS_Insert(ByVal pndAmt As Decimal) A... more >>
OleDb can't read Excel file?
Posted by Norman Diamond at 1/24/2008 8:16:50 PM
With Visual Studio 2005 SP1 and DotNet Framework 2 SP1, Excel 2003 can read
a file that was saved by Excel 2003, but the OleDb driver can't.
Example: Excel row 2 maps to row 1 in OleDb, and Excel columns 1 to 24 (A
to X) map to columns 0 to 23 in OleDb. Counting these in OleDb, row 1
colu... more >>
When a clr has the input type of SqlString it causes nvarchar(4000) to be the parameter type of the function in sql server. how to modify my CLR funct
Posted by DR at 1/24/2008 2:10:32 PM
When a clr has the input type of SqlString it causes nvarchar(4000) to be
the parameter type of the function in sql server. how to modify my CLR
function to use nvarchar(max) ?
... more >>
No value given for one or more required parameters. During Select Statment
Posted by amcbdc1 at 1/24/2008 12:13:40 PM
I am having a problem trying to run a Select Statment. I am using VB
and ASP.Net 2.0 is on the server. I am connecting to an Access
Database. Everything is working just fine on my test machine, but
doesn't like our Production Server. It keeps giving me this error
message:
* Message: N... more >>
Split() function on single column result set? (VB.NET)
Posted by Mike at 1/24/2008 9:01:02 AM
Hi. I'm executing a DataReader and getting a single column resultset from a
SQL Database. I need to load each resultset's row into a string array
variable named CustomerNames(). Is it possible to do this? For example...
Dim CustomerNames() as string
CustomerNames = Split(mydatareader("co... more >>
Invalid attempt to FieldCount when reader is closed
Posted by mark.norgate@gmail.com at 1/24/2008 4:51:30 AM
Hi
I have a repeater control nested within another repeater control, and
both the repeaters have a connection to the database.
I'm having problems because the application complains that "Invalid
attempt to FieldCount when reader is closed", even though I'm opening
and closing connections in the... more >>
Inserting from a asp:table
Posted by merrittr at 1/22/2008 11:56:48 PM
I have a sqldatasource and a asp:table as below, using the
InserCommand from the sqldatasource how would I get the fields in the
table inserted ?
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConflictDetection="CompareAllValues"
<asp:Table ID="Table1" runat="... more >>
How to open MS Access database in VB 2005
Posted by YosiLeib at 1/22/2008 7:04:52 PM
hi everybody
don't know if it's the right place to ask this qustion but I'm new with VB
2005 and need to open Access database in my project (the database was
created with VB6).
how do I do this task
thanks
... more >>
TableAdapter SQL Update Help
Posted by jp2msft at 1/22/2008 6:12:06 PM
I have 2 tables: EmployeeInfo and MGRSPV (Manager/Supervisor).
On the DataGridView, we modified the EmployeeInfo Table's Fill/GetData to
replace the EmployeeInfo.MGR value with the Manager/Supervisor's name from
MGRSPV.[MGR/SPVSR] as follows:
SELECT EmployeeInfo.FIRSTNAME, EmployeeIn... more >>
loading an xmldocument object
Posted by Roger at 1/22/2008 4:06:05 PM
is that a way to load an xmldocument object into a dataset object?... more >>
When will ADO.NET Entity Framework?
Posted by Alexander Vasilevsky at 1/21/2008 8:45:26 PM
When will ADO.NET Entity Framework?
http://www.alvas.net - Audio tools for C# and VB.Net developers
... more >>
The definition of access rights in MS SQL Server 2005
Posted by Alexander Vasilevsky at 1/21/2008 8:10:57 PM
How programmic (C#) to know whether there is a right of access to the server
object (table, stored procedure) for current user.
http://www.alvas.net - Audio tools for C# and VB.Net developers
... more >>
Binding Source - Cant Delete - Can From BS Datasource
Posted by Richard Coltrane at 1/21/2008 4:23:25 PM
Hi there,
As i understand it binding sources are supposed to be a layer of indirection
for an underlying datasource.
However I often find my self unable to delete records from a binding source
using the remove method, and yet if i delete a row from its underlying
datasource/data table - ... more >>
C# ConnectionStringName
Posted by jp2msft at 1/21/2008 7:20:01 AM
Using VB, I can access the database connection string (or other application
settings) using:
Dim myconnStr As String = My.Settings.ConnectionStringName
What is the equivalent in C#?
... more >>
how to remove databinding
Posted by jp2msft at 1/21/2008 6:55:02 AM
We have a database with one table of 15000 employees and 21 fields. (Yes, it
needs to be restructured, but that isn't happening today).
I have a DataGridView that is databound to the table. Whenever the
application starts, it takes about 5-10 seconds to populate this DataGrid
(depending on ... more >>
VBA code/style equivalent
Posted by John at 1/19/2008 6:02:59 PM
Hi
I am synchronising one access db with its master via the below code;
Dim dbSynch As DAO.Database
Set dbSynch = DBEngine(0).OpenDatabase(<path local>)
dbSynch.Synchronize <path remote>
dbSynch.Close
Set dbSynch = Nothing
How can I do this in vb.net/ado.net?
Thanks
Regards
... more >>
Checking for table existence
Posted by John at 1/19/2008 5:56:52 PM
Hi
How can I check for existence of a certain table by name in and access
database and if the table exists find the number of records in it?
I guess I can access this information by setting up a dataset for the
database but I am wondering if there is a quick way to find this.
Thanks
... more >>
Linq - Relation in .dbml but not in code behind
Posted by fredd00 at 1/19/2008 7:28:58 AM
Hi
I have a db the looks like
DVD - (table)
id (primary key , identity)
title
categoryId (fk on Category Id)
.....
Category (table)
Id (primary key , identity)
name
....
Tag
DvdID (fk on DVD id)
name
when i drop the 3 table on dbml the 3 tables and 2 associations are
creat... more >>
Dataset bug
Posted by Aleksey Timonin at 1/18/2008 8:22:31 PM
Hi guys,
I'm using Dataset in my project. In design time I configure TableAdapter in
the Dataset and set to the adapter as an Insert query following sql:
INSERT INTO UserInterface.ViewFields
(createdBy, createdOn, modifiedBy, modifiedOn, viewId,
fieldId, logicalFieldNa... more >>
Dataset bug
Posted by Aleksey Timonin at 1/18/2008 8:22:10 PM
Hi guys,
I'm using Dataset in my project. In design time I configure TableAdapter in
the Dataset and set to the adapter as an Insert query following sql:
INSERT INTO UserInterface.ViewFields
(createdBy, createdOn, modifiedBy, modifiedOn, viewId,
fieldId, logicalFieldNa... more >>
What woudl be the better design (migth be double post)
Posted by Harry Leboeuf at 1/18/2008 12:52:12 PM
Hello
In our dimensions we have a lot of data that is related on several levels.
Ex
Table 1 Company_ShowType (PKey Comp_Id, CShowType_Id) Data
(Local_description, ShowType_Id)
Table 2 HQ_ShowTypes (PKey ShowType_Id) Data(HQ_Description, end quite
some more indications)
As quite ... more >>
Help! Question about literal date strings and ADO
Posted by B. Chernick at 1/18/2008 7:27:01 AM
I'm trying to write a web app in Dot Net 2.0 (VB) that accesses some old
FoxPro 6 tables, connecting through OleDb. By necessity I need to manually
write the Insert and update calls for the table adapters. One of the
requirements of the project is that certain date fields be automatically se... more >>
TableAdaptor Configure and Query Builder Differences
Posted by paulb at 1/18/2008 6:05:16 AM
Hi,
I am using VS2005 vb.net. I have a dataset.xsd file where I have
added a dataAdapter and built my queries using the built in Query
Builder.
I am connecting to an Access database with the following connection
string:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\127.0.0.1\database
\... more >>
How to get a single value out of a dataset
Posted by JEFF at 1/17/2008 4:15:34 PM
There is most likely a better way to do what I am trying to do here so any
advice on a better solution would be greatly appreciated. I have a table of
events in an Access db. I want to get the eventid of record to feed to an
aspx page via QueryString. Here is what I am trying:
Di... more >>
Inserting and updating values
Posted by Keon at 1/17/2008 3:24:42 PM
I am trying to figure out the following information when storing some info
to the database, I don't know how to do this and therefore I am stuck.
I am going to try and explain this to the best of my ability.
I have two tables in my db, my first table I am writing the following
information to... more >>
array allocation and garbage collection
Posted by Jon at 1/17/2008 1:16:12 PM
If I allocate an array, eg:
double[] x = new double[10000];
then use the array, then at some later point, allocate it again, eg:
double[] x = new double[15000];
does the garbage collector know that the memory allocated the first time round can be garbage
collected, or do I have to ... more >>
Modify Schema
Posted by T. Ford at 1/17/2008 7:10:03 AM
How does one modify the schema of a table via ADO.NET? I know that you can
do a lot with just SQL statements. Using ALTER TABLE, ALTER COLUMN, etc work
great for SOME databases. But there are things you can't do with SQL for
some databases. For example, with ACCESS, you cannot modify the p... more >>
|