SQL Select satement question
Hi All,
This may be a bit of a newbie question with an obvious answer, but I've dug
around everywhere and can't find out how to do it. I'm creating a .net web
app and have a series of drop-down lists that are all tied to sql tables.
The select statement in each of the drop-downs is based on the selection in
the previous drop-down (think the same sort of functionality that you see at
large automotive sites where you pick the year, and then the make and finally
the model).
I know that I have to concatenate all of the select statements after the
first one, but I don't know how to grab the selected value. The page itself
is asp.NET but the code behind everything is vb.NET
Thanks in advance,
-Mike Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99119
Select statement based on previous field
Hi All,
This may be a bit of a newbie question with an obvious answer, but I've dug
around everywhere and can't find out how to do it. I'm creating a .net web
app and have a series of drop-down lists that are all tied to sql tables.
The select statement in each of the drop-downs is based on the selection in
the previous drop-down (think the same sort of functionality that you see at
large automotive sites where you pick the year, and then the make and finally
the model).
I know that I have to concatenate all of the select statements after the
first one, but I don't know how to grab the selected value. The page itself
is asp.NET but the code behind everything is vb.NET
Thanks in advance,
-Mike Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99118
remoting/web services passing typed datasets
We are testing speed/functionality of remoting and web services while
planning a distributed windows forms application.
With web services, it is very easy to pass a dataset, but is it possible to
pass a typed dataset? If not, is there a way to convert the dataset into
the typed dataset?
Masa Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99117
Windows SP2 conflicts with SQL Server
Has anybody had problems arise with connecting to SQL Server from a web
app after installing SP2? I am getting an access denied error on a web
app after installing SP2. I have verified that the ASPNET user is
permitted in SQL server. I can connect through Enterprise Mgr., and the
database was not affected during the upgrade, however, I am not able to
access the DB through Query Analyzer either. Any ideas?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99111
Get Table and Field Names
How do I get the names of the tables in a database via ado.net? Once I have
the table names, how do I get the names of the Fields for each table? I
used to use OpenSchema in vb6 but do not find a correlating command for
.net. Thanks. Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99107
Unspecified Error on MyConnection.Open() to MS Access File
Hi. I'm trying to connect to an MS Access .MDB file from ASP.NET (in C#).
I've Imported System.Data and System.Data.OleDb. My code looks like:
OleDbConnection myConnection = new OleDbConnection();
myConnection.ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\xyz.mdb";
myConnection.Open();
when I try to do the last line ("myConnection.Open()"), I get an Unspecified
Error. I have no idea how to debug this!
* Is it because it can't reach the .MDB or that there are permissions
problems on it?
* Is it because maybe I don't have that exact "Provider" installed (how do I
check that)?
One more related question: in an ASP.NET .ASPX page, when I provide the path
in the connection string, if I want it to be a relative path, how do I
determine what OleDb considers to be the current path in which it would look
for the file if I provided no path information?
Your help is much appreciated.
Alex Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99104
Updating a DataGrid that is disconnected from a data source
Hi, I am trying to use a data grid in a web application in which I have
three tiers. The DataGrid is not set up to a data source, or a data adapter,
so everytime I make a change I send the cell information to another object
which forms an SQL query and makes the query to the DB (actually to a
DBFacade object). In any case, please see the code I have listed below for
my update DataGrid event. With this code, the DB is updated using the old
data in the datagrid prior to the users changes, why is this and how can I
take the new data out of the grid after the user makes changes? Thanks very
much!
private void coursesDataGrid_UpdateCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
// get primary key courseID
TableCell courseIDCell = e.Item.Cells[1];
string courseID = ((TextBox)courseIDCell.Controls[0]).Text;
// get section
TableCell sectionCell = e.Item.Cells[2];
string section = ((TextBox)sectionCell.Controls[0]).Text;
// get semester
TableCell semesterCell = e.Item.Cells[3];
string semester = ((TextBox)semesterCell.Controls[0]).Text;
// get title
TableCell titleCell = e.Item.Cells[4];
string title = ((TextBox)titleCell.Controls[0]).Text;
// get school name
TableCell schoolNameCell = e.Item.Cells[5];
string schoolName = ((TextBox)schoolNameCell.Controls[0]).Text;
// update database here
coursesDataGrid.DataSource = courseManager.UpdateCourse(user, schoolName,
semester, courseID, title, section);
coursesDataGrid.EditItemIndex = -1;
coursesDataGrid.DataBind();
}
Jon Agiato Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99103
Connection string does not work from asp.net web application
If I run the following code on my development machine as a "Windows
Application", it works. If I run the following code on my development
machine as an "ASP.NET Web Application", I get the error "SQL Server does not
exist or access denied." when trying to open the connection. I would
appreciate any assistance in determining why.
Private Sub TestAdo()
Dim conn As New System.Data.SqlClient.SqlConnection
Dim cmd As New System.Data.SqlClient.SqlCommand
Dim dr As System.Data.SqlClient.SqlDataReader
conn.ConnectionString = "Data
Source=np:SQLSERVER1;uid=username;pwd=password;Initial
Catalog=STARMT;Connection Timeout=5;"
conn.Open()
cmd.Connection = conn
cmd.CommandText = "select * from customers"
dr = cmd.ExecuteReader()
Do While dr.Read
'
Loop
dr.Close()
conn.Close()
End Sub
Thanks in advance.
Clay Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99102
SQLConnection
I have few forms that I am trying just to display the data.
In each form I need to fire different sqlstatements to get the data. Before
executing each sql statement I am opening the connection, executing
sqlreader, closing sqlreader and closing the connection. Sometimes I get
errors like SQL connection is already open or sqlcon is busy fetching etc.
What is the better approach for me to accomplish this.
Thanks Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99097
Missing SourceColumn mapping?!
Hi all,
having trouble with an Access database, it has a table "Books", the program
uses a dataset to work with the database.
I set up the schema for the table "Books" as follows:
(C#)
////////////////////////////
m_dataset.Tables.Add("Books");
DataColumn PrimaryKeyColumn =
m_dataset.Tables["Books"].Columns.Add("ID",typeof(int));
m_dataset.Tables["Books"].PrimaryKey = new DataColumn[] {PrimaryKeyColumn};
m_dataset.Tables["Books"].Columns.Add("Name",typeof(string));
m_dataset.Tables["Books"].Columns.Add("ISBN",typeof(string));
m_dataset.Tables["Books"].Columns.Add("Price",typeof(float));
m_dataset.Tables["Books"].Columns.Add("iStock",typeof(int));
m_dataset.Tables["Books"].Columns.Add("mStock",typeof(int));
m_dataset.Tables["Books"].Columns.Add("Barcode",typeof(string));
m_dataset.Tables["Books"].Columns.Add("Description",typeof(string));
////////////////////////////
and then everytime i try to fill it with the dataadapter an exeption
"Missing SourceColumn mapping for 'ID' " is thrown.
Im totaly in the dark with this one, nothing I try makes any difference, any
help would be great!
Val Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99083
Parameters.Add
I am new to .Net. I have a windows form in which I am using a Stored
Procedure to get the data. I am successful in retrieving the data, however
after closing the form and reopening the form I landed in a problem . The
error is too many parameters.What I did was I included a line
SqlCmd.Parameters.Clear before Parameters.Add - line and I fixed the issue.
Can any explain why this is happening and how I can control it?
thanks
Vb Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99082
WriteXml & XmlDataDocument questions
Hi everyone,
I have a question regarding DataSets and the WriteXml method.
Specifically, I'm having trouble writing out my DataSet, then reading the
contents back in to an XmlDataDocument.
For instance, my code reads like this:
/////////////////////////
StringWriter l_strWrite = new StringWriter();
XmlDataDocument l_XMLDocument = new XmlDataDocument();
//MyDataSet is a pre-existing DataSet
MyDataSet.WriteXml(l_strWrite,System.Data.XmlWriteMode.WriteSchema);
l_XMLDocument.LoadXml(l_strWrite.ToString());
////////////////////////
No errors when I run this, however when all is said and done, my
XmlDataDocument's DataSet member has zero tables, whereas the original
("MyDataSet") has one table in its collection. Something's not right--
maybe I'm not saving the DataSet correctly via WriteXml()?
I realize the XmlDataDocument class has a DataSet member that I can assign
to, however in my code I can't just simply set things equal to
MyDataSet....I'm trying to write out the DataSet to a string then pass it
around from one section of my program to another. Only later on will I
create my XmlDataDocument.
Maybe I should create a temporary DataSet from my string when the time
comes, then assign it to my XMLDataDocument's DataSet member? Sounds like a
hack, but maybe it's an option. I don't know.
If you have any suggestions or ideas on how I can correctly write out/read
in my DataSet to an XMLDataDocument, I'd be glad to hear them. Thanks very
much.
-Jim Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99078
Select Top 10 from a DateTable???
Hi! I want to select only 10 rows from a dataTable each time, just as
from a database("SELECT TOP 10 FROM orders WHERE ID <100 ORDER BY
ID"). for example:
DataTable myTable = new DataTable("orders");
DataRow[] rows = myTable.Select("TOP 10 ID < 100");
1)How can I write the correct statement.
2)Can I ues "TOP" key word or there's other way to do it?
P.S. I mean from a dataTable.
Thank you very much. :shock:
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------* Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99065
Concurrency violation: the UpdateCommand affected 0 records.
Wanted to post my scenario about this error message for others to
benefit from...
I was getting this error on a certain table and could not figure out
why to save my life. I use the same data access strategy for all DA
objects and was not having the problem with any other object/table.
Here's what was going on:
The Update proc generated by the Data Adapter Configuration Wizard
creates 2 fields for every one... one for the current value and one
for the "Original" value.
I had a table with these columns:
Logon_ID
Username
Password
Original_Username
Original_Password
You should start to see the problem now. What happened was the DACW
creates a parameter for the Username called "Original_Username", then
I ALSO had the real field name "Original_Username". ADO.NET got
confused and thought that the field had changed because it was looking
at the wrong field, and it threw the "Concurrency violation: the
UpdateCommand affected 0 records." error. I changed my field names to
O_Username and O_Password and it was fixed.
I liked to never found this. It was a real problem for a couple days.
So, I wanted to share this info. I've had other problems like this
stemming from using certain words for/in field names, so I've resolved
to, at my next project, come up with a prefix to put in front of all
column names. It will be kind of clumbsy when working directly in the
Db (SQL), but the names can then be abstracted (the prefix can be
stripped) in the business objects. At least it will avoid weird
problems like this. Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99056
how to determine logged on user?
I have MSDE2000 using integrated authentication. How can I determine the
username of the logged on user from my asp.net app? Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99053
DataBind problem
i made tow combobox one of them filled in page load and the other one fill
when the user select a value form the First one but i got this error:
"The Column prefix 'System.Data' does not match with a table name or alias
name used in the query"
and this my code:
the First Combobox:
SqlConnection cnn = new SqlConnection();
cnn.ConnectionString = DB.ConnectionSTR(DB.Current_DB());
SqlCommand cmd = cnn.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "Select Client_ID,Client_Name From Client";
SqlDataAdapter da = new SqlDataAdapter();
DataTableMapping TblMap;
DataColumnMapping ColMap;
TblMap = da.TableMappings.Add("Client","Client");
ColMap = TblMap.ColumnMappings.Add("Client_ID","Client_ID");
ColMap = TblMap.ColumnMappings.Add("Client_Name","Client_Name");
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds,"Client");
cboClient_Name.DataSource = ds;
cboClient_Name.DisplayMember = "Client.Client_Name";
cboClient_Name.ValueMember = "Client.Client_ID";
The Seconde combobox:
SqlConnection cnn = new SqlConnection();
cnn.ConnectionString = DB.ConnectionSTR(DB.Current_DB());
SqlCommand cmd = cnn.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "Select MSA_ID,MSA_Effective_Date From MSA Where
Client_ID="+cboClient_Name.SelectedValue.ToString()+"";
SqlDataAdapter da = new SqlDataAdapter();
DataTableMapping TblMap;
DataColumnMapping ColMap;
TblMap = da.TableMappings.Add("MSA","MSA");
ColMap = TblMap.ColumnMappings.Add("MSA_ID","MSA_ID");
ColMap = TblMap.ColumnMappings.Add("MSA_Effective_Date","MSA_Effective_Date");
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds,"MSA");
cboClient_Name.DataSource = ds;
cboClient_Name.DisplayMember = "MSA.Client_Name";
cboClient_Name.ValueMember = "MSA.Client_ID"; Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99050
DataBind problem
i made tow combobox one of them filled in page load and the other one fill
when the user select a value form the First one but i got this error:
"The Column prefix 'System.Data' does not match with a table name or alias
name used in the query"
and this my code:
the First Combobox:
SqlConnection cnn = new SqlConnection();
cnn.ConnectionString = DB.ConnectionSTR(DB.Current_DB());
SqlCommand cmd = cnn.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "Select Client_ID,Client_Name From Client";
SqlDataAdapter da = new SqlDataAdapter();
DataTableMapping TblMap;
DataColumnMapping ColMap;
TblMap = da.TableMappings.Add("Client","Client");
ColMap = TblMap.ColumnMappings.Add("Client_ID","Client_ID");
ColMap = TblMap.ColumnMappings.Add("Client_Name","Client_Name");
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds,"Client");
cboClient_Name.DataSource = ds;
cboClient_Name.DisplayMember = "Client.Client_Name";
cboClient_Name.ValueMember = "Client.Client_ID";
The Seconde combobox:
SqlConnection cnn = new SqlConnection();
cnn.ConnectionString = DB.ConnectionSTR(DB.Current_DB());
SqlCommand cmd = cnn.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "Select MSA_ID,MSA_Effective_Date From MSA Where
Client_ID="+cboClient_Name.SelectedValue.ToString()+"";
SqlDataAdapter da = new SqlDataAdapter();
DataTableMapping TblMap;
DataColumnMapping ColMap;
TblMap = da.TableMappings.Add("MSA","MSA");
ColMap = TblMap.ColumnMappings.Add("MSA_ID","MSA_ID");
ColMap = TblMap.ColumnMappings.Add("MSA_Effective_Date","MSA_Effective_Date");
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds,"MSA");
cboClient_Name.DataSource = ds;
cboClient_Name.DisplayMember = "MSA.Client_Name";
cboClient_Name.ValueMember = "MSA.Client_ID"; Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99049
Performance counters SqlConnection vs ODBC vs OLE DB
I'm trying to monitor connection pooling in a web app on our development web
server. The connection string is a .Net SqlConnection string. I'm trying to
monitor connection pooling via the .Net CLR data SQLClient counters but I am
not seeing any connections being made in the pools. (pooling is on by
default) Why am I not seeing any of the counters?
I did see a reference someplace that said the counters would only show
connections made by an ODBC connection string. Can anyone confirm this?
Thanks
John Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99047
Still Problem with Dataview.Find
Hello,
When I Do Desc, It works but everything is backwards. All the records go
from Z - A. I need them to go from A - Z and grab the first one it finds.
ASC reproduces the behaviour stated below:
I am retrieving data from a database "Order By LastName", when I use a
dataview to find a Last Name it does not give me the first instance of the
Last Name.
ie.
ADataView.Sort = "LastName"
AnInteger=ADataView.find("Smith")
BindingContext(ADataView).Position = AnInteger
If there are more than one "Smith" in the database it goes to the second
one instead of the First one.
What I need is for it to go to the first one.
Any suggestions will be greatly appreciated.
Thanks,
Chuck Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99046
MSDTC Wrap Directly?
Looking for any sample code on using MSDTC directly, without
inheriting from ServicedComponent. I want to use MSDTC with xcopy
deployment, so nothing can be hard-installed into the COM+ catalog or
require Administrator rights. OS is XP and Win2003.
Thanks. Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99045
finding row position in a dataview based on multiple keys....
I am trying to find a row in a dataset using the key values (whether it is sorted by them or not)
and then move to that row in the dataset. the DataView.Rows.Find(Keys()) works fine to return the
row, but then I need to move the CurrencyManager to the correct position for the resulting
datarow. Is there a way to move to a record in a dataview based on multiple keys?
--
-Rick
________________________________
Hardware, n.: Part of a computer, that when played with long enough, will eventually break.
Software, n.: Part of a computer, that when played with long enough, will eventually work. Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99038
OdbcConnection with compatibility level 2
Hello,
is there any way to initialize an OdbcConnection object restricted to
ODBC V2 features even though the ODBC driver is version 3? I have a
.NET assembly that is used as a COM-Server by another application.
That application uses ODBC 2 and the ODBC driver returns the results
in the version 2 way. After the app initializes the COM Server an my
assembly connects to the same database using the same driver, the ODBC
driver returns the result codes in the version 3 way. To the driver
the app and the COM-Server appear as one process because it is an
Inproc-Server. That confuses the app because statements like "delete
from tableXYZ where 1=2" now return SQL_NO_DATA instead of
SQL_SUCCESS. Anything but SQL_SUCCESS ist treated as an error by the
SQL libs of that app. Sad but true.
In the Reflector I discovered OdbcConnection has an internal property
IsV3Driver and cache the major version of the driver. But everything
seems to be private or internal.
Do you have an idea? Any help is appreciated. Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99037
Calling a Mdi child Form from a modal one
The application loads the main form (mdi parent) and
then it shows a modal form for validation porpuses.
After the user writes the password the validation form
closes, and then I need to call a Mdi child form. How
can I do this? Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99032
Update Command
I am using parameters etc when populating a dataset using a DataAdapter. I
have an Update command of the folllowing form :
UPDATE projects SET
ID=@ID,Address1=@Address1,Address2=@Address2,Postcode=@Postcode WHERE ID=@ID
Where ID is my primary key. When I change Addres1 etc.. then use
DataAdapter.Update(changes) everything is updated nicely, however if I
change the ID value of one of the rows then use adapter.update(changes) I
get a concurrency violation exception, presumably this occurs because I am
trying to update the ID value when ID is in the WHERE clause. Is there
anything I can do to correct this problem?
Thanks,
Steven Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99018
Performance of Find?
I was wondering what kind of algorithm is behind the DataRowCollection.Find
method, where you are searching by the primary (and unique) key. Can I
expect "table-scan"-like performance O(n) or is there some sort of indexing
that makes it constant or logarithmic in performance?
I'm currently contemplating doing some complex sums, either in the DB
(which - of course - has the best performance on the actual calculations),
or in my client (which would remove the connection overhead, and improve
multiuser-scalability)
Jesper. Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99016
msde error
Hi,
I install msde 2000 using the command line like this => setup SAPWD="pass"
But when I try to create a new database using access sql server database
wizard he ask me for a login id and password!
First if my password is pass what is the login id?
When I try the login id of my computer user name or sa and the password as
pass I always get an error message: Connection failed: SQLSTate:28000
SQLserver error:18452 Why???
Did my msde installation is good I set the server name and the msde icon in
the try icons is on and running!
Thanks! Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99014
Using a multi-select ListBox to delete records
I have a ListBox bound to a DataSet. I'd like to be able to select two or
more items in the ListBox and delete the corresponding records in the Access
table which serves as the data source.
I have figured out how to edit multiple records, by using a Do...Loop
construct to check each item in turn, test its state and edit it if it's
selected. But I couldn't make that approach work when deleting records,
because of course the number of records, and the index of each, changes every
time a record is deleted. I know about the For Each...Next construct and the
SelectedIndices collection, but I can't figure out how to use them to achieve
the goal. Any ideas, anybody? Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99010
DataSet can't determine 'childs'
Is it true that XML in this form is **unusable** for usage by
DataSet.ReadXml([file], XmlReadMode.Fragment) and
[DataRow][DataColumn].GetChildRows()?
Because I found that GetChildsRows() does not work. I am talking about a
DataSet which has a xsd schema.
Im suspecting currently, that GetChildRows -only- works if there is a
primarykey-foreign key relation ship.
I DO want to avoid to use the XmlDocument object to read all data! Is there
an easy fix for this?
The child(s) here is <option>
<entry>
<value>blah</value>
<entries>
<option>1</option></option>2</option>
</entries>
</entry> Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99008
Performance better with DataSet or DataReader or ...???
Hi,
I have a business-entity-classes which are constructed of few primitive
types and one DataSet type. For Example:
Public class MyClass{
private int id;
private string name;
private DataSet childrenCollection;
â?¦
In my data access layer I want to create an instance based on this class and
fill it with data from the DB (MSDE). I have two options in mind and I want
to know which would be the best in term of performance. In both options Iâ??m
using a single stored procedure with two select statements â?? one for the
single row (primitive types) and one for the children collection. For example:
SELECT ID, Name from T_Parents WHERE ID= id;
SELECT ID, Name from T_Children WHERE ParentID = id;
The options are:
1. Fill all the data into a DataSet. As there are two select statements two
tables will be created in the DataSet I would be able to copy the values from
the first table to my class primitive and the other table to my class
DataSet.
2. Use a DataReader and, by looping over the second ResultsSet, build a
DataTable row after row. So instead of using the DataSet.Fill method Iâ??ll be
â??manuallyâ?? creating the rows and inserting the values based on the results
coming from the DataReader.
I donâ??t think it matters, but Iâ??m using the data access application bloc v2.
If there is another (better) option I havenâ??t thought about Iâ??ll be happy to
know. Otherwise I would like to know which one should perform better.
Thank you,
Gwenda Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99006
auto-populate SQLCommand.Parameters collection based on stored-procedure
if in VB.NET or C# , if I associate a SQLCommand object with a specific
stored-procedure on a specific database on a specific sql-server ....
is there a way to trigger auto-population of the SQLCommand.Parameters
collection ? (System.Data.SQLClient.SQLParameterCollection)
so ... each SQLParameter would have its various properties populated based
on the stored-procedure declaration ? Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99004
Need help!So strange with DataRow State..
Hi:everybody
I meet a very strange problem.
I use strong typed DataSet.
After I change the row value,the rowstate always UnChanged.
Here is the code:
dsOrder.order_master[cmMaster.Position].order_no=10;
string s dsOrder.order_master[cmMaster.Position].RowState.ToString();
or
dsOrder.order_master[0].order_no=10;
string s dsOrder.order_master[0].RowState.ToString();
s is always "UnChanged".
But in the morning ,It was working very well.
I try to change the tables DefaultView' value,
the same thing happend,I got confused,
Dose anybody met problems like this?
Thanks ! Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99003
Dispose vs Close
Trying to determine if calling Dispose destroys the connection instead of
releasing the connection back to the connection pool where a close does
release to the connection pool. I have read documentation that made that
statement. Most everyone agrees dispose does call close then cleans up some
more. But does Dispose destroy the connection and not release back to the
pool (when connection pooling is enabled)?
Also, does a data layer have to implement the IDisposable interface when
working with connections (closing and releasing a connection) in the
component? Our apps do create and pass in a connection when working with
transactions but for the selects we use the datareader with the
CloseConnection behavior and some datasets with the disconnection taking
place.
And one more item, we have encrypted connection strings in our web.config
file. Is using connection factories better and is there any explaination on
how to build the factory?
Thanks Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 99000
Invalid cast from DBNull to Decimal
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C4C82C.DD082030
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I must be just looking at this for so long I am going blind. Here is =
part of the code:
For Each _lRow In _laRow
Me.DepYrStraightLine.DepreciationYearID =3D =
CType((_lRow.Item("DepreciationYearID")), System.Guid)
Me.DepYrStraightLine.DepreciationID =3D =
CType((_lRow.Item("DepreciationID")), System.Guid)
Me.DepYrStraightLine.DepreciationTypeID =3D =
CType((_lRow.Item("DepreciationTypeID")), Integer)
Me.DepYrStraightLine.Year1 =3D CType((_lRow.Item("Year1")), Decimal)
Me.DepYrStraightLine.Year1BookValue =3D =
CType((_lRow.Item("Year1BookValue")), Decimal)
Me.DepYrStraightLine.Year2 =3D CType((_lRow.Item("Year2")), Decimal)
Me.DepYrStraightLine.Year2BookValue =3D =
CType((_lRow.Item("Year2BookValue")), Decimal)
The rows (or columns rather) Year1BookValue and Year2BookValue are two =
new columns I added to the table. I have gone all the way from the =
stored procs and tables and through the code to make sure everything was =
identical on the column data type settings. The data type is just like =
'Year1' and 'Year2'. Decimal, default value of (0.0) 27 precision and 15 =
scale.
When I step through with the debugger and get to any of the new columns, =
I get an invalid cast exception that says the cast to DBNull from =
Decimal is not allowed. However, the 'Year1'/'Year2 fields have 0D in =
them.
Any idea what could be causing this problem?
Thanks.
Norton
------=_NextPart_000_0008_01C4C82C.DD082030
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2523" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I must be just looking at this for so =
long I am=20
going blind. Here is part of the code:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>
<P><FONT face=3DArial size=3D2>For Each _lRow In _laRow</FONT></P>
<P><FONT face=3DArial size=3D2>Me.DepYrStraightLine.DepreciationYearID =
=3D=20
CType((_lRow.Item("DepreciationYearID")), System.Guid)<BR></FONT><FONT=20
face=3DArial size=3D2>Me.DepYrStraightLine.DepreciationID =3D=20
CType((_lRow.Item("DepreciationID")), System.Guid)<BR></FONT><FONT =
face=3DArial=20
size=3D2>Me.DepYrStraightLine.DepreciationTypeID =3D=20
CType((_lRow.Item("DepreciationTypeID")), Integer)<BR></FONT><FONT =
face=3DArial=20
size=3D2>Me.DepYrStraightLine.Year1 =3D CType((_lRow.Item("Year1")),=20
Decimal)<BR></FONT><FONT face=3DArial =
size=3D2>Me.DepYrStraightLine.Year1BookValue =3D=20
CType((_lRow.Item("Year1BookValue")), Decimal)<BR></FONT><FONT =
face=3DArial=20
size=3D2>Me.DepYrStraightLine.Year2 =3D CType((_lRow.Item("Year2")),=20
Decimal)<BR></FONT><FONT face=3DArial =
size=3D2>Me.DepYrStraightLine.Year2BookValue =3D=20
CType((_lRow.Item("Year2BookValue")), Decimal)</FONT></P>
<P><FONT face=3DArial size=3D2>The rows (or columns rather) =
Year1BookValue and=20
Year2BookValue are two new columns I added to the table. I have gone all =
the way=20
from the stored procs and tables and through the code to make sure =
everything=20
was identical on the column data type settings. The data type is just =
like=20
'Year1' and 'Year2'. Decimal, default value of (0.0) 27 precision and 15 =
scale.</FONT></P>
<P><FONT face=3DArial size=3D2>When I step through with the debugger and =
get to any=20
of the new columns, I get an invalid cast exception that says the cast =
to DBNull=20
from Decimal is not allowed. However, the 'Year1'/'Year2 fields have 0D =
in=20
them.</FONT></P>
<P><FONT face=3DArial size=3D2>Any idea what could be causing this=20
problem?</FONT></P>
<P><FONT face=3DArial size=3D2>Thanks.</FONT></P>
<P><FONT face=3DArial size=3D2>Norton</FONT></P></DIV></BODY></HTML>
------=_NextPart_000_0008_01C4C82C.DD082030-- Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98999
Transfer Dataset / DataTable / Datareader Info to Excel Spreadsheet
Is there some type of command that will allow me to transfer records in a
datatable/dataset/ or datareader to an Excel Spreadsheet?
Or do I have to do some type of manual iteration through a DataReader /
DataTable?
L Johnson Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98993
DataView.Find
Hello,
I am retrieving data from a database "Order By LastName", when I use a
dataview to find a Last Name it does not give me the first instance of the
Last Name.
ie.
ADataView.Sort = "LastName"
AnInteger=ADataView.find("Smith")
BindingContext(ADataView).Position = AnInteger
If there are more than one "Smith" in the database it goes to the second one
instead of the First one.
What I need is for it to go to the first one.
Any suggestions will be greatly appreciated.
Thanks,
Chuck Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98991
urgent: connection pooling error
Hi all, I have a web service that opens a sqlconnection to the db and does
some work. Just recently I have begun getting the following error on a
frequent basis:
Timeout expired.The timeout period elapsed prior to obtaining a connection
from the pool.This may have occurred because all pooled connections were in
use and max pool size was reached.
I have verified that my web service is closing connections. Why is this
happening? Can I increase the max pool size? How?
thanks,
Param Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98987
insert data help!
Hello!
I use a DataAdapeter ( and DataSet) to access to my database. I have get all
data well (fill the dataset), but when I try to update it, I got nothing!
The code is below. Pls help me
conn = new SqlConnection(strConn);
sda = new SqlDataAdapter();
ds = new DataSet();
ds.DataSetName = "ds";
string tmp = "SELECT * FROM Personal";
SqlCommand selectCmd = new SqlCommand(tmp, conn);
sda.SelectCommand = selectCmd;
sda.Fill(ds, "Personal");
conn.Close();
SqlCommand insertCmd = new SqlCommand("InsertNewPerson",
sda.SelectCommand.Connection);
insertCmd.CommandType = CommandType.StoredProcedure;
SqlParameter[] parms = new SqlParameter[4];
parms[0] = new SqlParameter("@name", SqlDbType.NVarChar, 50);
parms[1] = new SqlParameter("@code", SqlDbType.Char, 4);
parms[2] = new SqlParameter("@type", SqlDbType.Char, 1);
parms[3] = new SqlParameter("@isAvailable", SqlDbType.TinyInt);
for (int i = 0; i < 4; i++)
insertCmd.Parameters.Add(parms[i]);
insertCmd.Parameters[0].Value = "NewName";
insertCmd.Parameters[1].Value = "0000";
insertCmd.Parameters[2].Value = "M";
insertCmd.Parameters[3].Value = 1;
sda.Update(ds,"Personal");
the storedProc:
REATE PROCEDURE InsertNewPerson(
@name nvarchar(50),
@code char(4),
@type char(1),
@isAvailable tinyint
)AS
insert into Personal values(@name, @code, @type, @isAvailable)
GO Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98986
Mdi child controls
I need to know what control (within a
mdi child form) has focus when the user
clicks on a toolbar buttom from the mdi
parent form, If that's make sense... =) Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98984
OBJ REF NOT SET TO AN INSTANCE OF AN OBJ
guys ive been pouring over this for hours. i'm bascially copying code from another working asp.net program and i just cant see what im missing.
the logon procedure certainly finds the obj reference yet when i go to execute the sql query string, i keep getting this message. and im basically doin the exact same thing from the other program, just querying a different table, so why the ERROR??
here's the code if anyone can take the time to figure out what im missing.
i've looked at all the variables
Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExport.Click
sql = "select * from cont_payroll where empl_id='0322K' and ppe="15-oct-04'"
Try
Dim oracon As New OracleConnection("Server=atserver;Uid=rik;Pwd=winter_04")
Dim ds a new Dataset
oracon.Open()
ds.Clear()
ds.EnforceConstraints = False
Dim myCmd As New OracleCommand
myCmd.Connection = oracon
myCmd.CommandText = sql
myCmd.CommandType = CommandType.Text
Dim myDa As New OracleDataAdapter(myCmd)
myDa.Fill(ds)
If ds.Tables.Count = 0 Then
lblLogon.Text = "Nothing found"
ElseIf ds.Tables.Count >= 1 Then
Dg1.DataSource = ds.Tables(0)
Dg1.DataBind()
Else
End If
oracon.Close()
Catch ex As Exception
lblLogon.Text = ex.Message
End Try
End Sub
End Class
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources... Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98983
Strategy Question: Semi-Structured Data Comparisons
All,
I'm hoping one of you Xml or Data gurus can offer an opinion. I'm working
on an app to basically compare two semi-structured data files (e.g. Excel /
CSV) to one another. But I need to compare them as if they were
datatables... (ie a simple diff type tool won't work)...
More specifically, the process I envision so far is:
1) Read in two files -- if Excel select appropriate sheet (would also
require users to structure their worksheets as tables -- ie no mixed data so
common with Excel)
2) Determine worksheet -- if Excel
4) Scan for columns
5) Have user determine which is source and which is target (or file being
compared)
6) Have user match one or more "key" columns between two files --
eg Source File "ID" column = Target File "UserID" column (allows for
arbitray column names)
7) Have user select (similar to above) columns to compare (simple text,
integer or boolean equality for now)
8) Run the comparison determining --
a) Rows in one but not the other file (based on the Keys)
b) Rows with matching keys but non-matching (changed) comparison columns
c) Rows that match key / compare columns
Here's what I'm asking:
- I know how to do / have written 1 - 7.
- I also know how to do 8 above via brute force -- eg going from the source,
read row by row, column by column and comparing keys and comparison columns
between the two...
* What do you recommend as the data structure? Currently using an OleDB
generated dataset. Does Xml or a collection make more sense?
* If dataset or Xml, is there a better way than brute force? Dataview with
Find? Merge and detect differences?
Would appreciate any advice from anyone who's been there before. One
concern with brute force approach is that these files could contain hundreds
to thousands of rows (yes, I wish my fellow employees would do more with
databases) -- which, worst case scenario of, say, a thousand rows in each
file results in potentially, I believe, 1 Million comparisons....
Any thoughts, comments, suggestions? Conversion of source data to Access,
SQL Server, Oracle not an option......tried it already (politics)....
thanks in advance,
tim Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98975
Query about closing connections to SQL Server database.
I have an application that connects using SqlConnection objects to a SQL
Server database.
When I first execute the Connection.Open() method, two new connections
appear in my database (according to sp_who2, both of them are from the
program ".Net SqlClient Data Provider"). Firstly, is it normal for two
connections to appear like this?
Anyway, straight after opening the database I call Connection.Close().
Neither of the connections in the database close at this point. Is this the
expected behaviour? I'm wondering whether this is just due to connection
pooling and is nothing to worry about but would like some confirmation.
Calling the .Dispose method on the connection has no effect either.
The connections don't disappear from the database until I close my
application and return to the IDE.
My thanks in advance for any guidance anyone can provide.
--
(O)enone Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98970
Oracle Stored Procedure Problems
Hello, I am calling an Oracle Stored Procedure. It has a column which is
defined as "Float". The Oracle procedure defines a parameter for this field
as "Float". In my program I create a parameter which is a Oracle DbType of
"Double". When I execute the procedure, it fails with an ORA 06502 and ORA
06512 and these error messages talk of not being able to convert propertly
from string to numeric.
When I look at the table, I see that my transaction did apply to the
database, inspite of the error message, but the Fields which is identified as
"float" and I defined a "Double" has the amount that I passed, but the value
truncates the last four decimal places - I passed 8 decimal positions but
only 4 remained.
Am I using the correct datatype in my program to describe a float value?
Any ideas as to why I am getting the Errors begin returned?
The output paramterters, when I create them in my program, - the "value"
portion of thos parameters, do they need be to initialized with "null" in the
"Value" property?
Thanks in advance for your assistance!! Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98964
No partial class for a strongly typed row in a s.t. dataset in 2.0
The dataset itself is a partial, that's nice, can attach code to it if I wish.
Ditto for the datatable.
However, the area where I was really interested in doing it, the strongly
typed datarow, no go. Sure, I can continue to wrap the row in a custom
class, but it feels more natural to me to be able to extend the strongly
typed datarow class directly.
Too late to re-think that?
Kenneth Russo
USCA5 Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98962
Account Groups
I am accessing an Access database with User groups/accounts set up, is there
any way for me to determine which groups indvidual accounts are a member of
from my .net application.
i.e. if my connection string is :
Dim STR_CONNECTION As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=db.mdb; User ID=Alice; Password=AliceABC"
Is there any way to determine what group Alice is in?
Thanks,
Steven Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98951
Asp.Net cannot insert record to dbf file? Help
I have a class library to insert a new record into a dbf file. I always get
exception "Operation must use an updateable query" when the function is
called by a Asp.Net function. However, the insersion works well when I call
the function using NUnit. The following is the writing dbf code. Any clue?
Thanks.
Class DAL
static public function writedbf()
...
Dim dbfConnectionString as String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=C:\dbfs;Extended Properties=dBase IV;User ID=Admin;Password="
Dim InsertCmdStr As String = "Insert Into wolog (WOTYPE, REF_NO, PRIORITY,
Unit, DEPT, DEPT_ID, PAC2, RQNAME, RQPHONE, SHOP, ASTO, WODATE, OPTR,
LOCATION, COMM1, ESTHR, STATUS, UP, ROOM, FLR) values
('D','D700804','5','90','740','1','2BUS','a','a','SEC','','11/10/2004
2:02:27 PM','login','2 BUS ST a ','a ',0,'N','N','a','')"
Dim cmd As New OleDbCommand(InsertCmdStr, New
OleDbConnection(dbfConnectionString))
cmd.Connection.Open()
Try
REF_NO = cmd.ExecuteScalar()
Catch err As Exception
Throw err
Finally
If Not cmd.Connection Is Nothing Then
cmd.Connection.Close()
End If
End Try
.... Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98928
Confusing quotation marks from ADO .NET to stored procedures
Hi,
I am new to database. I am having difficulty with quotaion marl
problems when I am passing string variables in ADO .NET to varchar
variable in SQL stored procedures.
In ADO .NET code, I used:
SqlParameter[] parameters = {
new SqlParameter("@StartCity", SqlDbType.VarChar, 50),
new SqlParameter("@EndCity", SqlDbType.VarChar, 50),
new SqlParameter("@TripDate", SqlDbType.DateTime, 8) }
parameters[0].Value = strStartCity; // strStartCity =
txtStartCity.Text;
parameters[1].Value = strEndCity;
parameters[2].Value = tripDate; // tripDate is System.DateTime
type
.....
DataSet trips = RunProcedure("usp_GetTrips", parameters,
"Trips");
Then in SQL stored procedure, I used:
SELECT *
WHERE StartCity LIKE @StartCity AND EndCity LIKE @EndCity
AND DateDiff(day, DateAdd(day, -3, @dtTripDate),
TripDate)<10
This does not work returning no result. I used SQL Query Analyser
debugger to check the stored procedure. It seems the string value
like 'Ottawa' is automatically padded with " (double quotation marks)
at both ends and these quotation marks are counted as a character. So
it does not work.
When I used the following in my stored procedure:
SELECT *
WHERE StartCity LIKE 'Ottawa' AND EndCity LIKE 'Toronto'
AND DateDiff(day, DateAdd(day, -3, '11/16/2004'),
TripDate)<10
It worked and returned the results.
It seems that the strings passed from ADO ,NET code is not interpreted
as string literal in stored procedure. What is the problem and what
settings do I need to turn on to solve it?
Thanks a lot for your time and help.
David
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------* Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98926
Re: Does anyone know anything about this BUG?
Ok, Ryan. Thanks for your attention.
Do you get 0 rows in which one of the result sets? Because it shows 2 result
sets. One with the expected result and another one, where the extra brackets
were added with the "wrong" result. Just like bellow:
--------------------------------------------------------------------------------------------------------------------------------------
C:\Temp>AdoTableSelectTest
LESS BRACKETS FILTER RESULTS
( Description = 'Type B' and Number = 7 ) and ( Code = 'B' )
Row Count: 0
Code - Number - Description
---------------------------
EXTRA BRACKETS FILTER RESULTS
( ((Description = 'Type B')) and ((Number = 7)) ) and ( Code = 'B' )
Row Count: 2
Code - Number - Description
---------------------------
B - 2 - Type B
B - 3 - Type B
C:\Temp>
--------------------------------------------------------------------------------------------------------------------------------------
Note that the values in the Number column in the 2nd result set are 2 & 3
respectively. But the filter clause says "Number = 7"(???).
If both result sets are returning 0 rows, then I don't know what it is. It
might be that you have a different MDAC or .NET Framework version where this
problem has already been fixed.
Many thanks,
Dalmo
"W.G. Ryan eMVP" <WilliamRyan@NoSpam.gmail.com> wrote in message
news:eJcEwwfxEHA.1452@TK2MSFTNGP11.phx.gbl...
> Dallara:
>
> I'm not sure I follow you - I copied the code below and ran it - and I'm
> getting 0 rows selected. When I change the code block to this :
> DataRow Row1 = Table.NewRow();
>
> Row1["Code"] = "A";
>
> Row1["Description"] = "Type A";
>
> Row1["Number"] = 1;
>
> Table.Rows.Add(Row1);
>
> I get exactly what I'd expect.
>
>
> --
> W.G. Ryan MVP (Windows Embedded)
>
> TiBA Solutions
> www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
> "Dallara" <someone@microsoft.com> wrote in message
> news:#7rGTIexEHA.2016@TK2MSFTNGP15.phx.gbl...
>> Hi
>>
>> Just found a bug in the System.Data.DataTable.Select() method in ADO.NET.
>> To reproduce the bug, just create a C# Console application with the code
>> bellow on the start up class and execute it.
>>
>> What happens is that in some specific situations when you add some extra
>> brackets to the filter string, rows that don't match the filter criteria
> are
>> selected. If you remove the brackets the select works fine. And it's not
>> a
>> matter of precedence as all conditions are joined by AND.
>>
>> In the spike bellow, one of the filter conditions is "Number = 7". This
>> condition doesn't match any rows in the test table. Even thought, in the
>> select where extra brackets are added to the filter, 2 rows that match
>> the
>> other conditions are improperly selected. These rows have Numbers 2 and 3
>> respectively (not 7).
>>
>>
>> Thanks,
>> Dallara
// --------------------------------------
// -- SPIKE TO CATCH THE BUG --
// --------------------------------------
using System;
using System.Data;
namespace AdoTableSelectSpike
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
TestAdoTableSelect();
}
protected static void TestAdoTableSelect()
{
DataTable Table = GetTestTable();
string Condition0 = "Description = 'Type B'";
string Condition1 = "Number = 7";
string Condition2 = "Code = 'B'";
string LessBracketsFilter = String.Format("( {0} and {1} ) and ( {2} )",
Condition0, Condition1, Condition2);
DataRow[] LessBracketsRows = Table.Select(LessBracketsFilter);
WriteResults(LessBracketsRows, LessBracketsFilter, "LESS BRACKETS FILTER
RESULTS");
string ExtraBracketsFilter = String.Format("( (({0})) and (({1})) ) and
( {2} )", Condition0, Condition1, Condition2);
DataRow[] ExtraBracketsRows = Table.Select(ExtraBracketsFilter);
WriteResults(ExtraBracketsRows, ExtraBracketsFilter, "EXTRA BRACKETS
FILTER RESULTS");
}
protected static DataTable GetTestTable()
{
DataTable Table = new DataTable("TestTable");
Table.Columns.Add("Code", typeof(System.String));
Table.Columns.Add("Description", typeof(System.String));
Table.Columns.Add("Number", typeof(System.Int32));
DataRow Row1 = Table.NewRow();
Row1["Code"] = "A";
Row1["Description"] = "Type A";
Row1["Number"] = 1;
Table.Rows.Add(Row1);
DataRow Row2 = Table.NewRow();
Row2["Code"] = "B";
Row2["Description"] = "Type B";
Row2["Number"] = 2;
Table.Rows.Add(Row2);
DataRow Row3 = Table.NewRow();
Row3["Code"] = "B";
Row3["Description"] = "Type B";
Row3["Number"] = 3;
Table.Rows.Add(Row3);
return Table;
}
protected static void WriteResults(DataRow[] Rows, string FilterString,
string ResultsCaption)
{
Console.WriteLine("");
Console.WriteLine("");
Console.WriteLine(ResultsCaption);
Console.WriteLine("");
Console.WriteLine(FilterString);
Console.WriteLine("Row Count: " + Rows.Length.ToString());
Console.WriteLine("Code - Number - Description");
Console.WriteLine("---------------------------");
foreach (DataRow Row in Rows)
{
string Line = String.Format(
"{0} - {1} - {2}",
Row["Code"].ToString(),
Row["Number"].ToString(),
Row["Description"].ToString());
Console.WriteLine(Line);
}
Console.WriteLine("");
}
}
}
// -------------------------------------- Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98924
Stored procedure Debug in .Net 2003
Hi all
I am trying to debug a stored procedure using VS.Net 2003. I get this
message
"Cannot debug stored procedures because the SQL server database is not
setup correctly or user doesn't have permission to execute
master.sp_sdidebug."
Database server is running on Win3K
Database SQL 2000
Client desktop: Win XP pro sp1
I am logged in as Administrator
This problem only exists when I the debug stored procedure on remote
(SQL 2000 running on Win3K machine) database server. However I can
debug stored procedure on local database (SQL 2000) that is running on
XP pro sp1.
Any help would be greatly appreciated.
Thanks
Dipendra Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98914
Show the ordinal number of a row in a dataset
I want to build a lookup dialog form that uses the row index number to view a
particular row. How do I show the row index number a datagrid so a user can
select it?
Thanks Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98913
paper size crystal reports problem
I have set printer options property (portrait and A4) of Report just before
show it to user but still printer prints letter format. From all other
applications (notepad, word, excel, ...) default format is A4 but in crystal
it is letter but I set for A4. Why? Any ideas?
thx
--
-----------------------------------------------------------------------------------------------------------------------
Dzemal Tipura (Dzemo) - MCP Tag: Is there an Ole DB (or ODBC) provider for Microsoft Works db Tag: 98906
Is there an Ole DB (or ODBC) provider for Microsoft Works database?
Re: Is there an Ole DB (or ODBC) provider for Microsoft Works db by Egbert
Egbert
Mon Nov 15 04:52:38 CST 2004
"PIEBALD" <PIEBALDconsult@aol-dot-com.no-spam.invalid> wrote in message
news:4196f396$2_2@Usenet.com...
> Is there an Ole DB (or ODBC) provider for Microsoft Works database?
There are no drivers for unstructured data in oledb as far as I know except
for XLS documents.