Complex Database Transactions
Until now, I've been using stored procedures to update my databases because
I've been taught stored procedures are faster (precompiled) and eliminate
the possibility of some kinds of injection attacks.
But now I need to create code to record a purchase transaction. Not only
would this require around a dozen arguments, but these arguments could
include any number of invoice items. Based only on trying to pass these
arguments, it does not appear that a stored procedures is up to the job.
I'm still pretty new to database development and would appreciate any
comments on the best way to proceed with this.
Thanks.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com Tag: test Tag: 145819
see for dotnet questions
C# Interview Questions and Answers8
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html
C# Interview Questions and Answers7
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers7.html
C# Interview Questions and Answers 6
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers-6.html
C# Interview Questions and Answers 5
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers-5.html
C# Interview Questions and Answers 4
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers-4.html
C Interview Questions 3
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-3.html
C Interview Questions 2
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-2.html
C Interview Questions
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions.html Tag: test Tag: 145816
Mounting a file as a database
Hi Guys,
I am trying to create a Windows Service to update 14000+ products on my
website every 30 minutes
I download CSV pricelists from my suppliers during this process but I found
an article on the internet a while ago, but I cant seem to find it any more
about mounting a file as a database using ADO
Any ideas how I would do this? or where the website is?
TIA Tag: test Tag: 145814
====> Secret SEX Couples M M S Clips <====
HAI..........
Guys this web site s very useful to
you...........
How This site
helps..........
how to earn money form
online......
In this site, you wil earn more than 10000/- Rs per month....
its true ....... just login this site and << EARN MONEY
>>
www.freeonlinedollers.blogspot.com
www.freedollers.blogspot.com
www.moviesgossips.blogspot.com Tag: test Tag: 145813
=?KOI8-R?B?Lo0gjSCNII0gU0VDUkVUIFdFQiBDQU1TII0gjSCNII0=?=
HAI..........
Guys this web site s very useful to
you...........
How This site
helps..........
how to earn money form
online......
In this site, you wil earn more than 10000/- Rs per month....
its true ....... just login this site and << EARN MONEY
>>
www.freeonlinedollers.blogspot.com
www.freedollers.blogspot.com
www.moviesgossips.blogspot.com Tag: test Tag: 145812
reg datatable
hi,
I've a requireemnt ..in which my query will pull all the data from the
database table..and binds to a grid based on some calculations.....
the count of records wil be around 700000 records....
can I store this data in datatable..and bind to the grid..
what effect will it have on the performance of the page...
can someone sayy if it's optimal way ??? Tag: test Tag: 145811
Concurrency error handling
Hi
I have asked this question before but have not received any clear answer. I
have a winform app with bound controls via dataadapter/dataset combination.I
have a dbconcurrency exception ex. Now I have the following;
DataRow = ex.Row
DataTable = ex.Row.Table
DataColumns = ex.Row.Table.Columns
DataSet = ex.row.Table.Dataset
How can I now via code, do the following;
1. Make a copy of the datarow,
2. Re-read the row from datasource,
3. Update read row with values form row copy.
Any help woudl be appreciated.
Many Thanks
Regards Tag: test Tag: 145810
Changes to DataSet not sticking
I am currently making the move from ADO in VB6 to ADO.Net. It seems very
straightforward, but I have a serious, nagging problem w/ some code I've
written.
Here's the pseudo-code
Instantiate an object of Class WDABase (a class that is used in one of my
tutorials to encapsulate some basic DB functions)
Fill a DataSet from table
Set a DataView with which I will be doing my searches and updates
Do the last two items again for a different table
Loop a delimited text file
Pass an array of values to a procedure to either add a record or update
existing records
If no rows are found, add a new row
Else, update any rows that were found
Accept all changes using the DataSet's AcceptChanges method
Set my views to nothing
Close my database connection
I've pasted the code below. I'm stumped! Can one of you ADO.Net jocks easily
spot what I am doing wrong?
-----------------------------------------------------------------
'Global Declarations in VB Code Module
Dim objAccessDB As New WDABase
Dim objDBView1 As New DataView
Dim objDBView2 As New DataView
Dim objDataSet As New DataSet
-----------------------------------------------------------------
'Instantiate the Access DB object and fill DataSet (imbedded in Select Case
logic
'in a procedure)
Using objAccessDB
'Set DataView
SetABCDataViews() 'Call to SetABCDataViews procedure, which works
well
'Revise label
MainForm.StatusLabel.Text = "Data Loaded...Processing Data"
MainForm.StatusLabel.Refresh()
'******* AT THIS POINT...I call a proce that opens a text file and
loop through it
' calling the UpdateABCMergeDB for each line, passing it an array
' of values that were read from a delimited file...then I return
here
' once the entire file has been read and delt with.
LoopTextFile()
'******* THIS is the point where I expect changes that I saw occur
' in the update procedure to "stick". But when the process
' concludes, w/ no errors, NONE of the new records are in
' the database and NONE of the updated records are updated???
objDataSet.AcceptChanges()
'Clear Dataviews
objDBView1 = Nothing
objDBView2 = Nothing
objAccessDB.CloseConnection()
End Using
-----------------------------------------------------------------------
' WDABase snippent - for clarity
'Class WDABase Constructor:
Public Sub New()
'Build the SQL connection string and initialize the Connection
object
Connection = New OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\ABC merges 97.mdb;")
End Sub
---------------------------------------------------------------------------
'Procedure to set up DBViews for each table to be searched
Private Sub SetABCDataViews()
Try
'Set up DataView for Subscriber
objAccessDB.OpenConnection()
'Get all Subscribers in a DataReader object
objAccessDB.SQL = "SELECT SubscriberID, SSN, MemberName,
GroupNumber, " & _
"GroupName FROM tblSubscriber"
'Fill the DataSet
objAccessDB.FillDataSet(objDataSet, "Subscriber")
'Set DataView one
objDBView1.Table = objDataSet.Tables(0)
objDBView1.Sort = "SubscriberID, GroupNumber"
Application.DoEvents()
MainForm.Refresh()
'Set up DataView for Group
objAccessDB.Command = Nothing
'Get all Groups in a DataReader object
objAccessDB.SQL = "SELECT GroupNumber, GroupName " & _
"FROM tblGroups"
'Fill the DataTable
objAccessDB.FillDataSet(objDataSet, "Group")
'Set DataView one
objDBView2.Table = objDataSet.Tables(1)
objDBView2.Sort = "GroupNumber"
Catch ExceptionErr As Exception
MessageBox.Show(ExceptionErr.Message)
End Try
End Sub
--------------------------------------------------------------------
' Perform Updates - Called from the procedure that loops my datafile, which
' passes in an array of values. When new records are change or updated, I
' examine the IntelliSense field values and the proper data is in the
associated
' record in the DataViews. So, this logic seems to be working fine...
Private Sub UpdateABCMergeDB(ByRef Values As String())
Try
'Find this item's row(s)
Dim SearchValues As Object() = {Values(0), Values(3)}
Dim FoundRows As DataRowView() = objDBView1.FindRows(SearchValues)
If FoundRows.Length = 0 Then
'There were no hits, add this row
Dim NewRow As DataRowView = objDBView1.AddNew
NewRow(0) = Values(0)
NewRow(1) = Values(1)
NewRow(2) = Values(2).ToUpper
NewRow(3) = Values(4)
NewRow(4) = Values(4).ToUpper
NewRow.EndEdit()
Else
'There were hits, loop them and modify the values
For Each RowToUpdate As DataRowView In FoundRows
RowToUpdate.BeginEdit()
RowToUpdate(1) = Values(1)
RowToUpdate(2) = Values(2).ToUpper
RowToUpdate(4) = Values(4).ToUpper
RowToUpdate.EndEdit()
Next
End If
'Get all Groups in a DataReader object
'Find this item's row(s)
FoundRows = Nothing
FoundRows = objDBView2.FindRows(Values(3))
If FoundRows.Length = 0 Then
'There were no hits, add this row
Dim NewRow As DataRowView = objDBView2.AddNew
NewRow(0) = Values(3)
NewRow(1) = Values(4).ToUpper
NewRow.EndEdit()
Else
'There were hits, loop them and modify the values
For Each RowToUpdate As DataRowView In FoundRows
RowToUpdate.BeginEdit()
RowToUpdate(1) = Values(4).ToUpper
RowToUpdate.EndEdit()
Next
End If
Catch ExceptionErr As Exception
MessageBox.Show(ExceptionErr.Message)
End Try
End Sub Tag: test Tag: 145808
data adapter command type advise
Hi
In data adapter I have a choice to select command types text, stored
procedure or table direct. Which one is most appropriate for sql server 2005
backend.
Many Thanks
Regards Tag: test Tag: 145803
Issues w/ using a DataTable with a TableAdapter's Update method
I created a TableAdapter (TA) in my VB 2005 project. I tested it to ensure
that its CRUD functionality is what I expected it to be.
I'm using the TA and its strongly-typed DataTable (DT) in my Wizard.
Initially, I populate the DT using the TA.GetData.
I pass the DT to a ASCX-styled control that 'pivots' (turns years into
columns) the data into a new DataTable (DT2), then binds it (DT2) to a
GridView form. I save the original DT in the viewstate. So far so good.
When I want to save the data, I compare the values in GridView to the DT
that has been retrieve from the viewstate. The DT's rows are modified
accordingly. So far so good.
However, when I attempt to use the TA's Update method, passing the DT, I get
an error about a missing parameter. I'm assuming that the parameter's value
is supplied by the field that has a matching name. I've noticed that each
row has a value in this field.
What am I missing here?
Another oddity, perhaps. If don't make an changes in the pivot grid, there
won't be any changes to the DT. Why is it that the each row's rowstate is
'modified'? Could this be related my the Update issue?
Thanks in advance.
Craig Buchanan Tag: test Tag: 145802
Working example for Inheritance in LINQ to Entity Framework using Visual Studio 2008 SP1
Does someone know any place to get working examples of inherence implemented
in Entity Framework using Visual Studio 2008 SP1.
I could only implement just one table per hierarchy (
http://www.codeproject.com/KB/architecture/LinqEntityFramework.aspx )
--
Fakher Halim Tag: test Tag: 145801
Best ASP.NET Hosting?
I am looking for a new ASP.NET hosting company.
I prefer...
UPTIME, RELIABILITY and SPEED!!!!
ASP.NET 3.5 support
SQL Server support
Good, proactive customer support
Any thoughts? What are your experiences? (I trust you all more than
reviews.) Tag: test Tag: 145794
Comparing Data
This is a multi-part message in MIME format.
------=_NextPart_000_0006_01C8E735.6D5CF270
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
We have an xml representation that we read over http. We turn this into =
ado data sets for use in our application. We bind to these data sets.=20
We download load this data on a periodic basis. We want to compare the =
newly downloaded data with the current data and have data change events =
trigger for only changes(adds, modifies, and deletes) in the data.=20
What is the best approach for this?
TIA=20
--=20
Howard Swope [ mailto:howard.swopeATnavteqDOTcom ]
Technical Lead
Media Development
Navteq Traffic [ http://www.navteq.com ] [ http://www.traffic.com ]
------=_NextPart_000_0006_01C8E735.6D5CF270
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.6000.16674" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>We have an xml representation that we =
read over=20
http. We turn this into ado data sets for use in our application. We =
bind to=20
these data sets. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>We download load this data on a =
periodic basis. We=20
want to compare the newly downloaded data with the current data and have =
data=20
change events trigger for only changes(adds, modifies, and=20
deletes) in the data. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>What is the best approach for =
this?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>TIA</FONT> </DIV><FONT =
face=3DArial size=3D2>
<DIV><BR>-- <BR>Howard Swope [ <A=20
href=3D"mailto:howard.swopeATnavteqDOTcom">mailto:howard.swopeATnavteqDOT=
com</A>=20
]<BR>Technical Lead<BR>Media Development<BR>Navteq Traffic [ <A=20
href=3D"http://www.navteq.com">http://www.navteq.com</A> ] [ <A=20
href=3D"http://www.traffic.com">http://www.traffic.com</A> ]</DIV>
<DIV> </DIV>
<DIV></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0006_01C8E735.6D5CF270-- Tag: test Tag: 145792
Parameter in Subquery
Hello,
I am trying to do a query to obtain the quantity bought of articles by
Families between a period of date and I am using the following query:
Select f.nombre, (select sum (ldp.cant) as ' Cant. Comprada' from LINDPRO as
ldp where ldp.codfam=fam.codigo and ldp.fecha <=desfec and ldp.fecha>
=hasfec)) from Familas as f;
When I executed the query get a error because it takes parameters (desfec
and hasfec).
Is it possible to do it.
Thanks.
Jose A. Fernández Tag: test Tag: 145791
see dot net interview questions
.NET database dev questions
http://freedownloadablebooks.blogspot.com/2008/03/net-database-dev-questions.html
Some general quickies
http://freedownloadablebooks.blogspot.com/2008/03/some-general-quickies.html
.NET WebDev interview questions - Part 1
http://freedownloadablebooks.blogspot.com/2008/03/net-webdev-interview-questions-part-1.html
.NET WebDev interview questions - Part 3
http://freedownloadablebooks.blogspot.com/2008/03/net-webdev-interview-questions-part-3.html
Electronic engineer interview questions
http://freedownloadablebooks.blogspot.com/2008/03/electronic-engineer-interview-questions.html
C++ notes for discussion
http://freedownloadablebooks.blogspot.com/2008/03/c-notes-for-discussion.html Tag: test Tag: 145790
IsolationLevel of ReadUncommitted
Hi,
I was wondering if you could use SqlCommand.BeginTransaction(
IsolationLevel.ReadUncommitted ) to speed up a database read, and if so, is
it necessary to perform the EndTransaction after the read is complete? Can
you use this approach for asynchronous database reading as well?
Any suggestions are welcome - my problem is that there are several users who
are notified any time a particular table is changed, and they will all try
and read the table the moment they are notified, and noticable delays occur
(longer than you would expect from the time it takes to get the result set
from running the query from the Query Analyzer - not necessarily a fair
comparison).
Any help would be appreciated. Thanks in advance. Tag: test Tag: 145789
Does a DataView increase the speed of an DataTable.Select ?
Hi out there,
I use an algorithm which uses different selects in loops and needs some
optimizations.
I read in a book that when I define a DataView with a specific sort my
DataTable.select is faster.
(The tables have a primary key and the select is containing these fields).
Is it true?
Thanks,
Frank Tag: test Tag: 145787
Designer Louis Vuitton Geant Canvas Couguar - Gray 93084gray
Designer Louis Vuitton Geant Canvas Couguar - Gray 93084gray Handbags,
Luxury, Best,Inspired
Designer Handbags : http://www.bagsbrand.com
Louis Vuitton Geant Canvas Couguar - Gray 93084gray Link :
http://www.bagsbrand.com/Louis-Vuitton-93084gray.html
Brand : Louis Vuitton ( http://www.bagsbrand.com/Louis-Vuitton-Handbags.html
)
Model : 93084gray
Louis Vuitton Geant Canvas Couguar - Gray Details :
Gray color Louis Vuitton leather with canvasRound type leathr handle
with silver buckleSilver color zipper closure at the topLouis Vuitton
name at the frontInside it has flat pocket and a cellphone holderComes
with serial numbers, authenticity card, dust bag, and care booklet
SIZE : 16.5" x 14.2" x 6.7"
Louis Vuitton Geant Canvas Couguar - Gray 93084gray :
http://www.bagsbrand.com/Louis-Vuitton-93084gray.html Tag: test Tag: 145786
Designer Chloe Tracy Pocket Tote - Black 049 black Handbags, Luxury,
Designer Chloe Tracy Pocket Tote - Black 049 black Handbags, Luxury,
Best,Inspired
Designer Handbags : http://www.bagsbrand.com
Chloe Tracy Pocket Tote - Black 049 black Link :
http://www.bagsbrand.com/Chloe-049-black.html
Brand : Chloe ( http://www.bagsbrand.com/Chloe-Handbags.html )
Model : 049 black
Chloe Tracy Pocket Tote - Black Details :
Gorgeous black leather handbagZip closure on top, elegant lining, and
zip pocket insideFlat hand straps fixed by cute metallic studsFront
pockets with hidden snaps and zip fastener aside Metallic six
protective studs on the base Comes with serial numbers, authenticity
card, dust bag, and care booklet SIZE : 17.5" x 10" x 4.5"
Chloe Tracy Pocket Tote - Black 049 black :
http://www.bagsbrand.com/Chloe-049-black.html Tag: test Tag: 145785
Winform sql server app
Hi
I am new to sql server and need to build a one-many winform app with visual
studio 2008 and sql server backend and need some pointers.
I have the following questions;
1. If I create the app by creating a relationship between master and child
tables in dataset and then dragging the master table and relation onto a
form to auto generate everything, would that be a good enough way to cerate
the app? If so, what more can I do to turn it into a robust enough app such
as error handling etc? If this is not a good way to cerate app what should I
instead do?
2. Is there a good book on the subject of vs2008/vb2008 and sql server 2005
specifically, that will me sufficient advise on how to develop the app?
Many Thanks
Regards Tag: test Tag: 145783
DataColumnMapping error
Hi
I just don't get this. If I create a DataColumnMappingCollection and then
copy it to an array when I then try to use the array like this I get error:
System.ArgumentException was unhandled Message="The DataColumnMapping is
already contained by another
DataColumnMappingCollection."
If I create the DataColumnMapping arrays manually it works. I was just using
1 item in both arrays.
DataColumnMapping[] mappings = GetColumnMappings(maps);
DataTableMapping tableMap = new DataTableMapping(null, null, mappings);
public static DataColumnMapping[] GetColumnMappings(JobRuleColumnMapping[]
mappings)
{
DataColumnMappingCollection mapColl = new DataColumnMappingCollection();
foreach (JobRuleColumnMapping map in mappings)
{
if (map.Source != null && map.Destination != null)
mapColl.Add(map.Source, map.Destination);
}
DataColumnMapping[] mapArr = new DataColumnMapping[mapColl.Count];
mapColl.CopyTo(mapArr, 0);
return mapArr;
}
Can someone please explain this?
Thanks
Andrew Tag: test Tag: 145782
dataset and different connections
when i design application which has dataset, i create connection at design
time. Then I use this connection to design table adapters. Now assume this
application will run in different environments. The structure of database
will be the same, however connection string may change.
Is it possible to create connection string dinamically such way that
designed table adapters still work?
--
Aleks Kleyn
http://www.geocities.com/aleks_kleyn Tag: test Tag: 145781
Connection poolling
Hi,
Despite somme reading (including doc, Reflector, etc.), i dont't really
understand wich is the best method between Close and Dispose (or perhaps
the both) to get pooling with SQL Server with a well defined connection
string ?
If any body have some idea or a good pattern to close a connection ?
Best regards
Gilles
*** Sent via Developersdex http://www.developersdex.com *** Tag: test Tag: 145773
MDB is not Updated only data Set
Good Afternoon,
I did the following step by step and i found out that the MDB or Access 2003
Database was not updated.
1. Create a new solution
2. Click Data Sources on the Solution Explorer
3. Create a new connection on an MDB File
4. Under the Dataset of Data Sources I Click Choose Detail
5. I Click and Drag the Dataset on my Form.
6. Automatically Binding Navigator, Add, Edit, Delete and Save Button
Appeared.
7. Click Run
8. Add a new Record
9. Save it
10. I check the MDB but no record was added.
11. Only the Dataset was updated.
When I exit the Application no changes were made.
I did the same for SQL. it was updated. How come it doesnt work with MS
Access??? Tag: test Tag: 145771
SQL Express Edition
We are currently tied between two options. One is to use Microsoft Access
2003 or Use MS SQL Express Edition (Bundled with Visual Studio.Net 2005). I
read a documentation Saying that in The Express Edition you can't make a
parallel Query etc... Our company is just a small business catering to a
maximum of 20 Concurrent Connections on a Database. Is it ok if we use SQL
Express Edition? What are the Pros and Cons? We are finding it hard to
develop Application using MS Access because of Limited Resources and one
thing more we are all new to this technology because we are using Foxpro for
DOS 2.6 and Visual Foxpro 7.0. MS SQL 2005 is very expensive and our company
can't afford it now. Will you please give me some advice.
Do you have sample source codes that implements MS Access VB.NEt 2005 with
Parent and Child Tables using DataGridView and having Default Buttons such
as Add, Edit, Delete, Find, Save where everything was done programmatically
including connection strings, Data Adapter etc...
This will really fastrack our Development Process. We downloaded a few but
some are not working when we run it our Visual Studio.Net 2005.
It is really hard on part to develop since our company is using only Dial Up
internet with 56 KBPS Connection.
Thanks in advance for your kind support. Tag: test Tag: 145766
Currency manager changes position on endedit
Hi
I have a winform app with fields bound to a backbend db via a currency
manager (System.Windows.Forms.CurrencyManager). The app generally works fine
but in a specific instance where I select a value from a drop down control
and then call the MyCurrencyManager.EndCurrentEdit(), to begin to try to
save the record, the position of the currency manger becomes -1 which
creates problem in saving and accessing the original record. What could be
the problem and how can I debug this?
Many Thanks
Regards Tag: test Tag: 145765
Running queries with low priority in ado.net on access database
Hi
We have an access database with several users. I run a number of queries in
sequence via ado.net on the same database form time to time. The problem is
that when the queries are run the users are almost locked out of database
due to low responsiveness of the database during the period the queries are
run. I am running the queries via OleDBCommand.ExecuteNonQuery().
Is there any way to run these queries at low priority? Also what is the
correct way to give delay between queries to allow access database to be
responsive to other users?
Many Thanks
Regards Tag: test Tag: 145761
Running queries with low priority
Hi
We have an access database with several users. I run a number of queries in
sequence via ado.net on the same database form time to time. The problem is
that when the queries are run the users are almost locked out of database
due to low responsiveness of the database during the period the queries are
run. I am running the queries via OleDBCommand.ExecuteNonQuery().
Is there any way to run these queries at low priority? Also what is the
correct way to give delay between queries to allow access database to be
responsive to other users?
Many Thanks
Regards Tag: test Tag: 145760
DataSet Cascade update is slow
Hi,
I have a master-detail relation between two tables in a typed DataSet. The
relation is enforced by forgein-key relation with update/delete cascade.
The user can create a master recorde (the session) and then adds details to
the session. Which can be some tens of thousands of rows. Saving the session
to the database (calling DataAdapter.Update) never ends for large number of
details. I am suspecting the cascade update to take a lot of time. I mean
when the new ID of the session is set on all the details rows before saving
them in their turn.
How can I accelerate this step of cascade? Why setting a field value (the
master ID) on some 10 of thousands of rows is that slow?
Thanks Tag: test Tag: 145759
Query regarding DataReader
I was trying to fill an object using DataReader. but the queries were
such that one query returned 14 columns and another returned 18
columns. i was trying to read data from reader in such a way that it
incorporated this in single method.
but the problem was that it was throwing an IndexOutOfRange exception
is there is way except for reading schema that i can fetch data only
if if exists? Tag: test Tag: 145757
"Linq to Sql" - Creating a Non-Unique Index on a Property
Hello,
Is there a way to set up a non-unique index during database creation (i.e.
on the call to DataContext.CreateDatabase), with Linq to Sql? A second
property marked as a primary key won't quite work for my scenario.
I could always execute a custom script in DataContext.OnCreated(), but if
there is a way to do this in the designer or the XML, that would be ideal.
Cheers,
Rich Tag: test Tag: 145756
Select from multiple tables in typed DataSet
Hi,
This may be a very silly question, but it has me beat at the moment.
How do I select data from more than one table into a typed DataSet?
I added a typed DataSet to my project with two related tables, and I
specified the relationship between them.
What I need to do is execute a query like this:
SELECT a.col1, a.col2, b.col3
FROM a, b
WHERE a.col1 = b.col1
AND b.col4 IN (@list)
The list parameter is a string holding a comma separated (and quoted),
arbitrary length list.
Obviously I can only define the query on one of the tables in the
DataSet - but when I get results back, they only contain columns for the
one table. I.e. if I've defined the query on table a, I only get two
columns in the result.
I can see why this should be the case, but is there a way that I can get
a result that contains columns from both tables.
Sorry if this is really obvious and I've just missed it.
Cheers
Peter Tag: test Tag: 145754
WQL query builder
Prompt UI control which would allow to construct WQL queries?
http://www.alvas.net - Audio tools for C# and VB.Net developers Tag: test Tag: 145753
Map data from one DataTable to another
Hi
I have a DataTable with data which I need to import into another typed
DataTable at runtime. The columns in the first DataTable may be different. I
have a
DataColumnMappingCollection (which the application user creates) which maps
the first DataTable column names to the second.
The first table may have more columns than I need to import to the second.
It's also possible that I may need to convert types from rows in the first
table to the second.
What's the most efficient way to get the data into the correct columns in
the second table?
I did wonder about doing something with the DbDataAdapter before filling the
first table. However it looked like I would have to query the data twice
from the data source. The first time to get the column names and then the
second after creating new column mappings. Is this a good idea?
Cheers
Andrew Tag: test Tag: 145748
Power Packs 3.0 Data Repeater
I can't add a control on a data repeater included on Visual Basic Power
Packs 3.0...
Will you please help me out. I'm using MS Access 2003 and Visual Basic.NEt
2005 Express. I will be using a weak type. I was just starting to build.
Here are the steps.
1. I created a form
2. I Drag a data repeater from the Toolbox
3. I add a textbox inside the data repeater
4. When I run the Form. The Textbox did not appear.
5. It did not generate any error then..
6. When I click Close or Click a part of the Form:
Object reference not set to an instance of an object.
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="Microsoft.VisualBasic.PowerPacks"
StackTrace:
at
Microsoft.VisualBasic.PowerPacks.NullDataManager.CancelCurrentEdit()
at Microsoft.VisualBasic.PowerPacks.DataRepeater.CancelEdit()
at Microsoft.VisualBasic.PowerPacks.DataRepeater.EndCurrentItemEdit()
at
Microsoft.VisualBasic.PowerPacks.DataRepeater.OnValidating(CancelEventArgs
e)
at System.Windows.Forms.Control.PerformControlValidation(Boolean
bulkValidation)
at
System.Windows.Forms.ContainerControl.ValidateThroughAncestor(Control
ancestorControl, Boolean preventFocusChangeOnError)
at System.Windows.Forms.ContainerControl.ValidateInternal(Boolean
checkAutoValidate, Boolean& validatedControlAllowsFocusChange)
at System.Windows.Forms.ContainerControl.Validate(Boolean
checkAutoValidate)
at System.Windows.Forms.Form.WmClose(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Form.DefWndProc(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmSysCommand(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Form.DefWndProc(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmNcButtonDown(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&
msg)
at
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[]
commandLine)
at Purchasing_and_Warehousing_System.My.MyApplication.Main(String[]
Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
What does this mean? Tag: test Tag: 145745
launch excel from asp.net
Hi, i'm trying to launch excel from an asp.net application; i have
installed excel 2003 on the server but i cant see it on the list of
application dcom, do i need to do something else?
Thanks. Tag: test Tag: 145742
Problem getting the right output from my typed dataset
I have a typed dataset which I used to generate an export file in XML
which is consumed by another program. What I'm having a problem is
that some of the elements aren't coming out the way I need them.
For example, I have a section (which is a child table for my record)
which keeps track of security accesses. The problem is, I need the
output to come out like this:
<SecurityAccess>
<Access>AA</Access>
<Access>BB</Access>
</SecurityAccess>
Instead, it comes out like this:
<SecurityAccess>
<Access>AA</Access>
</SecurityAccess>
<SecurityAccess>
<Access>BB</Access>
</SecurityAccess>
How do I get it to come out the way I want it to?
The schema fragment that defines this section:
<xs:element name="SecurityAccess" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="Access" type="AccessType" minOccurs="1"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
With Access Type defined as a xs:string with restrictions.
Any suggestions? Tag: test Tag: 145737
Importing a CSV into a Dataset (preferably. with VB.NET 2005)
Is there an easy way to import the contents of a CSV text file into a
Dataset, preferably using VB.NET (2005)?
Here's the clincher - I cannot use code I already found out there that
simply splits the lines based on commas in each line, as there are cases
where there may be a comma within a string (surrounded by quotes), and I
don't want to split on that.
Here's the first few rows of the data to give you an idea:
"Subscriber Number","Statement Date","Charge Type","Charge
Description","Amount"
"555-555-5555","02/11/2008","LOCAL AIRTIME, LONG DISTANCE and INTERNATIONAL
CHARGES","","$0.00"
"555-555-5555","02/11/2008","Taxes","","$8.60"
"555-555-5555","02/11/2008","WorldClass Int'l Rate","General","$0.00"
"555-555-5555","02/11/2008","BB BIS&BES AddOn","CUSTOM DATA PACKAGE","$(3.60)"
I also am not having any luck with the OLEDB examples out there too, as my
filename could have spaces in it (for example the current one is "Statement
Detail.csv"), and trying to do a "select * from Statement Detail.csv fails
every time.
Any ideas/suggestions? Tag: test Tag: 145736
Problem getting the right output from my typed dataset
I have a typed dataset which I used to generate an export file in XML
which is consumed by another program. What I'm having a problem is
that some of the elements aren't coming out the way I need them.
For example, I have a section (which is a child table for my record)
which keeps track of security accesses. The problem is, I need the
output to come out like this:
<SecurityAccess>
<Access>AA</Access>
<Access>BB</Access>
</SecurityAccess>
Instead, it comes out like this:
<SecurityAccess>
<Access>AA</Access>
</SecurityAccess>
<SecurityAccess>
<Access>BB</Access>
</SecurityAccess>
How do I get it to come out the way I want it to?
The schema fragment that defines this section:
<xs:element name="SecurityAccess" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="Access" type="AccessType" minOccurs="1"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
With Access Type defined as a xs:string with restrictions.
Any suggestions? Tag: test Tag: 145735
Asynchronous database calls
Hi
Using .NET 2.0, is there anyway of invoking Sybase and Oracle stored
procedures asynchronously?
The scenario is this: we have some (Sybase and Oracle) stored procedures
that are taking a few minutes to run. This means that our middle tier objects
are â??blockedâ?? waiting for the stored procedures to return their results. I
know I can use a worker thread from the user interface to effectively kick
off the time consuming call to the middle tier and database. However, my real
goal is to release middle tier resources as early as possible. In other
words, I would like to invoke a stored procedure and immediately free up the
resources consumed by the middle tier (e.g. database connection). Then, when
the stored procedure completes, it somehow signals to the middle tier that
the data is ready.
I did something similar to this with SQL Server and extended stored
procedures, where my extended stored procedure called a COM component and
gave it the results.
Can this be done in a .NET 2.0, Oracle 10g and Sybase ASE 12 setup?
Thanks! Tag: test Tag: 145732
dans commande xenical canada corpus pharmacie en ligne en France femme en termes de xenical canada generique pharmacie en France xenical suisse soft en ligne
dans commande xenical canada corpus pharmacie en ligne en France femme en termes de xenical canada generique pharmacie en France xenical suisse soft en ligne
+++ PERTE DE POIDS +++ PERTE DE POIDS +++ PERTE DE POIDS +++
+
ACHETER XENICAL BON MARCHE (ALL CARD ACCEPTED)
http://jhku.net/ACHETER-XENICAL-BON-MARCHE/
+
+
+
ACHETER ACOMPLIA BON MARCHE (ALL CARD ACCEPTED)
http://jhku.net/ACHETER-ACOMPLIA-BON-MARCHE/
+
+
+
ACHETER MERIDIA BON MARCHE (ALL CARD ACCEPTED)
http://jhku.net/ACHETER-MERIDIA-BON-MARCHE/
+
+
+
ACHETER PHENTERMINE BON MARCHE (Western Union, Diners, AMEX, VISA)
http://jhku.net/ACHETER-PHENTERMINEA-BON-MARCHE/
http://www.jamba-handy-videos.de
http://ibm-news.for-um.de/showthread.php?t=11774
http://groups.google.de/group/hdmi-cable/browse_thread/thread/7765af3b2e0c5639#
http://www.stellenangebot-ausland.de
http://www.salsapresse.com/modules.php?name=Forums&file=viewtopic&t=6022
commander xenical canada par mail
comprimes de xenical us usa bon marche
xenical canada au rabais au Canada
commander xenical us usa en ligne aucune prescription
xenical soft generique
acheter xenical concernées par cette
femme en termes de xenical canada
xenical canada soft sans prescription
xenical suisse Generique Inde
xenical Generique Inde
Achetez xenical
xenical suisse generique bon marche
xenical suisse le plus bon marche
dans commande xenical en France corpus
xenical soft en ligne
acheter xenical
acheter xenical
pharmacie en ligne us usa
commander comprime de xenical en France
xenical par email
acquerir xenical en France soft
Achetez Le xenical canada
generique medicaments canada
xenical canada Generique Inde
xenical au rabais au Canada
commander xenical par mail
xenical suisse commande en ligne
xenical belgique pharmacie
comprimes de xenical us usa bon marche
on xenical us usa a vendre
acquerir xenical canada soft
Achetez xenical
xenical bon marche Sans Prescription
xenical belgique suisse
xenical suisse soft sans prescription
xenical suisse soft sans prescription Tag: test Tag: 145731
How to join a multi table DataSet with update of a single table?
Hi,
I created a DataSet with this query:
Select cl.*, c.Nome CidadeCli, c.Estado EstadoCli, c.Pais PaisCli, p.Nome
CidadePraca, p.Estado EstadoPraca,
p.Pais PaisPraca, tc.*, di.Nome dvNome, bc.Nome bcNome, cr.Limite,
cr.Bloquear, NomeRegiao,
cv.Descricao cvDescricao, ba.Bairro, ba.Nome_Bairro, au.*, t.Transportadora,
f.Fornecedor,
ce.Nome Empresa_CidadeCli, clt.Cliente trTransporte, clt.NomeCliente trNome,
entr.Nome EntregaCidadeNome, entr.Estado EntregaEstado, entr.Pais
EntregaPais, cr1.Limite Limite1, ac.Descricao acDescricao
From Clientes cl left outer join Cidades c on cl.Cidade = c.Cidade
left outer join Cidades ce on cl.Empresa_Cidade = ce.Cidade
left outer join Regioes r on r.Regiao = c.Regiao
left outer join Cidades p on cl.Praca = p.Cidade
left outer join TiposDeCliente tc on tc.TipoCliente = cl.TipoCliente
left outer join Divulgadores di on di.Codigo = cl.Divulgador
left outer join Bancos bc on bc.Banco = cl.Banco
left outer join Creditos cr on cr.CodCredito = cl.CodCredito
left outer join Bairros Ba on Ba.Bairro = Cl.Cod_Bairro
left outer join Autor Au on Au.Autor = Cl.Cliente
left outer join CalculodeVencimentos cv on cv.CalculoVencimento =
Cl.Calculovencimento
left outer join CalculodeVencimentos ac on ac.CalculoVencimento =
Cl.Acerto_Consignacao
left outer join Transportadoras t on t.Transportadora = cl.Cliente
left outer join Transportadoras tp on tp.Transportadora =
cl.Transportadora_Padrao
left outer join Clientes clt on tp.Transportadora = clt.Cliente
left outer join Fornecedor f on f.Fornecedor = cl.Cliente
left outer join Cidades entr on cl.Entrega_Cidade = entr.Cidade
left outer join Creditos cr1 on cr1.CodCredito = cl.Credito_Consignado
This query has a lot of tables connected but the most important if the
Cliente (Client) table. The foreign tables are responsible to inform the
description of some codes.
My idea was to create this query and have the insert, update and delete
related to the Client table but when seting the DataSet, the option
GenerateDBDirectMethods are not available. Is there a way to fix it? It
should be intersting if VS asked which table should be used in this case.
Thanks,
Marco Castro Tag: test Tag: 145729
Dot Net Viewers
http://ganesh-freedotnetbooks1.blogspot.com
http://ganesh-freedotnetbooks.blogspot.com
http://freefreedownloadsoftwares.blogspot.com Tag: test Tag: 145727