 |
 |
Index ‹ DotNet ‹ ADO
|
- Previous
- 1
- ADO >> How to INSERT pure <NULL> Into SmallDataTime Field (MS SQL Server)I need to insert NULL into the field with SmallDataTime datatype.
In .NET when I tried to use "" or DBNull.Value it insert "" what
will be automatically converted into '1/1/1900' by SQL Server...
I need to have the Insert statement like this:
INSERT tblTest (Name,smDate) Values ('John',NULL)
But using pure NULL without double quotes ("") is not allowed in .NET.
When I use double quotes ("NULL"), .NET interpreted it as
character string and I got the SQL converting error.
Thank you for the help.
Eugene
- 2
- Microsoft Project >> Differing task TypesI have an Integrated Plan with approx 20 sub-projects linked into it. I have
noticed that these plans are a mixture of Fixed Unit default task type plans
and Fixed Duration default task type plans. Is this a problem when the
Integrated plan performs its calculations?
- 3
- ADO >> One Has Many relation via Dataset to XML questionHi,
I am trying to import/export XML from a database. For the purpose of
this posting I will keep the datastructures as simple as possible. Just
imagine a table 'User' and a table 'Roles', and then a table
'UserHasRole' that specifies what users have what roles (m:n relation).
The idea is that these tables store information about users and the
roles they have got assigned.
--- Tables start
Table User:
UserId
Name
Table Role:
RoleId
Name
Table UserHasRole:
UserHasRoleId
UserId
RoleId
--- Tables end
Now, what I would like is to export data from a database with the above
table layout to XML, let a (rather experienced) user edit the XML file
and then reimport the modified XML file. (Our system has no notion of
deleting users or roles, which significantly simplifies my task) Ideally
I would like to end up with an XML file similar to the following:
--- sample XML file start
<my_xml_io>
<Users>
<User id="1">
<Name>Foo</Name>
<HasRoles>
<Role id="1"/>
<Role id="3"/>
<Role id="4"/>
</HasRoles>
</User>
<User id="2">
<Name>Bar</Name>
<HasRoles>
<Role id="2"/>
</HasRoles>
</User>
</Users>
<Roles>
<Role id="1">
<Name>Admin</Name>
</Role>
<Role id="2">
<Name>Guest</Name>
</Role>
<Role id="3">
<Name>Developer</Name>
</Role>
<Role id="4">
<Name>Manager</Name>
</Role>
</Roles>
</my_xml_io>
--- sample XML file end
I.e. the m:n relation is represented implicitly in the 'User' element.
Now with all the DataSet automation support in VS.NET my first try,
was to visually design some typed datasets, fill them from the db and
then use 'WriteXML'. But the XML I get looks like this (simplified a bit):
--- generated XML file start
<my_xml_io>
<User id="1">
<Name>Foo</Name>
</User>
<User id="2">
<Name>Bar</Name>
</User>
<Role id="1">
<Name>Admin</Name>
</Role>
<Role id="2">
<Name>Guest</Name>
</Role>
<Role id="3">
<Name>Developer</Name>
</Role>
<Role id="4">
<Name>Manager</Name>
</Role>
<UserHasRole id="1">
<UserId>1</UserId>
<RoleId>1</RoleId>
</UserHasRole>
<UserHasRole id="2">
<UserId>1</UserId>
<RoleId>3</RoleId>
</UserHasRole>
<UserHasRole id="3">
<UserId>1</UserId>
<RoleId>4</RoleId>
</UserHasRole>
<UserHasRole id="4">
<UserId>2</UserId>
<RoleId>2</RoleId>
</UserHasRole>
</my_xml_io>
--- generated XML file end
What is the best way to archive my desired XML representation, instead
of the normalized one I currently get?
many thanks in advance,
Andreas
- 4
- Net Framework >> Memory leak in C#?????I have a button on a form, and when you click the button, it performs
the following:
using (FormMS f = new FormMS())
{
f.ShowDialog();
}
The new form that is shown (FormMS) has a DataGrid that gets bound to
a large DataTable. The DataTable is static so it only gets created
once. So I open FormMS as a dialog and then close it. I continue to
open and close it several times and each time, the memory used by my
application goes up a lot. It doesn't seem to deallocate the memory
needed by the DataGrid. I try calling GC.Collect() after the FormMS
closes and it doesn't do the trick. I tried letting the application
sit overnight to see if it would deallocate the memory and that
doesn't work. I try calling the DataGrid.Dispose method inside my
FormMS.Dispose method and that doesn't work. I have to restart the
application to get it to deallocate the memory. I keep opening it
again and again to see if I must use up all my physical memory before
it deallocates, and that doesn't work either.
Any ideas?
Thanks in advance.
- 5
- Visual C#.Net >> Need Help urgentdaer all...
i'm a new comer with C#, but i want to build a mobile application. does any body can tell me, where do i can start ?
what software needed ?
where i can find a good references to learn it ?
i have .Net installed on my PC, but when there is no Mobile Web Application template. Is there some thing missed with it ?
please help.....
best regards....
- 6
- Dotnet >> Closed Captioning: from a DVD to a StringHello all!
I'm trying (read: becoming frustrated) to write a DVD viewer in VB.NET. I
can embed the DVD picture using DirectX technology, but it seems to be
impossible to obtain closed captioning from the DVD and convert it to a
string. There were a few tips on getting the captioning in the MSDN, I know,
but they were rather cryptic (unusual) and didn't convert the captioning to a
string.
If there is anyone who can help me, or even just tell me what I'm trying is
impossible, I'd be most grateful.
--
Wraith Daquell
...there is only one Daquell.
- 7
- Winforms >> Refresh only the CurrentRow of a DataGridView?I have a DGV that is read only. When selecting a row, the item is edited in
individual controls elsewhere on the form, also bound to the same
bindingsource. The default behavior is that when the value is changed in a
textbox, it only repaints the value in the DGV cell after the textbox commits
the value to the underlying object. I want it to update the DGV cell's
display in real time. To do this, I have code in the textbox's TextChanged
event to update the underlying object's property and refresh the DGV. This
works ok. However, if there are more than a handful of records displayed,
this refresh is slow and distracting.
So two questions:
1) Am I approaching this the correct way? Is there a better way to have the
DGV reflect the changes in real time?
2)If this is the best way, is there any way to refresh/repaint only the
currently selected row?
Thanks for any ideas.
Barry
- 8
- Visual C#.Net >> control helpI have 10 textboxes on my page, textbox1 - textbox10. Rather than modify
them individually, I would like to modify them with a variable something
like this:
for (int i = 0; i <= 10; i++)
{
textbox[i].text = "some text";
}
Is this possible? Would I need to create some kind of control array?
Thanks,
Dave
- 9
- Winforms >> Form control re-build when entering the MDI containerWe have a huge activex control embedded in a Form window. When the Form
has its MDIParent set to a mdi container, the window handle of the Form
is replaced by a new one, and our control has to be InPlaceActivate
twice plus one InPlaceDeactivate( The window handles of the standard
controls within are also replaced ), This causes side effects to our
activex control. The activation involves lengthy initializations such
as downloading data from internet and heavy rendering work, so it is
too expensive to do InPlaceActivate frequently. And our control has
some operations depending on the parent window. Is there any workaround
to avoid frequent inplace activation and window re-building, for
example, creating the mdi child form directly from the MDI container?
- 10
- Visual C#.Net >> Binding problemHello!
at runtime, when the execution reaches this line:
oGetExpression.DataBindings.Add("Expression",myDataSet,"ADR.Condition");
where: <Expression> is a public property of type string
<myDataSet> is the datasource
<"Adr.Condition"> is the datamember from dataset:
table.tableField
this exception is thrown:
"Object type cannot be converted to target type."
why is this happening?
Thank you.
- 11
- Visual C#.Net >> Display Linked-List in a DataGridView?How do I set a linked-list as a data source for a DataGridView control?
Should the linked list be a member on a form or its own global class
(or doesn't matter...???) Right now when I set the list as the data
source, the only columns I get are Count, First, and Last. I want data
from the nodes displayed but they are not available as columns to be added.
- 12
- Visual C#.Net >> How to get instance of a container from the control insideI have a class extending PictureBox. I use it as container adding a
Label control inside the PictureBox.
I use this kind of "widget" in another class, and I want to catch the
event on mouse click on the label only. That works.
But in the event function, I want to call a function to modify the
container, but I don't know how to do that.
Example:
namespace xxx
class myPictureBox : System.Windows.Forms.PictureBox
{
private Label txt;
public myPictureBox()
{
txtTab = new Label();
this.Controls.Add(txtTab);
}
public void SetPictureBoxAttributes(//some stuff)
{
//set some stuff
}
public Label GetTabLabel()
{
return txt;
}
}
class myApp
{
public myApp()
{
xxx.MyPictureBox pb = new xxx.MyPictureBox();
pb.SetPictureBoxAttributes(//some stuff);
pb.GetTabLabel().MouseDown += new
System.Windows.Forms.MouseEventHandler(this.pblabMouseDown);
}
public void thetabMouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
Label currentlabel = (Label)sender;
currentlabel.????? // what to call to retreive the container pb
and
// call the function
SetPictureBoxAttributes();
// ???????????????????????
}
}
Thank you
François
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
- 13
- Visual C#.Net >> unhandled exception of type 'System.Net.WebException' occurred in system.web.services.dllI have a C# MRS application that uses the ReportingService's Render
method to retrieve a byte array containing a report.
The following error message occurs
An unhandled exception of type 'System.Net.WebException' occurred in
system.web.services.dll
Additional information: The operation has timed-out.
I saw the following post on MSDN
An unhandled exception of type 'System.Net.WebException' occurred in
system.web.services.dll Additional information: The operation has
timed-out.
To avoid this problem, set the timeout value for the XML Web service
call to infinite, as shown in this example:
Service1 obj = new Service1();
obj.TimeOut = -1; // infinite time out.
My question is how do I incorporate the code into my application - I get
a
Invalid token '=' in class, struct, or interface member declaration
Error message
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
- 14
- 15
- Visual C#.Net >> Threading problem - Urgent HelpHi,
I have the following problem. I created a
Properties section:
private SerialComm oComm = new SerialComm(); // Wraps a DLL to handle Serial
//comms.
private Thread PrinterThread = null; // Serial Communications Thread
private void Form_load(...)
{
PrinterThread = new Thread(new ThreadStart(StartPrinter));
PrinterThread.Name = "SerialPrinter";
}
// The Thread is started in this procedure
private void button_click(....)
{
if (PrinterThread.ThreadState.ToString() == "Unstarted")
{
try
{
PrinterThread.Start();
Thread.Sleep(0);
}
catch (Exception Ex)
{
//Handle exception
}
}
// This is the procedure the for the Thread
private void StartPrinter()
{
Thread.Sleep(0);
LogInfo("Label Printing: printing thread started");
oComm.sendToPrinter(sFactor,false);
// Calls the serial printing process. It starts its own receiving Thread
within it.
// Returns to this procedure when done. The receiving thread must have
been
//aborted.
if (oComm.lStatus)
this.sMessage.Text = "Printing label has Finished";
// I got an Thread exeption here. After the aborting the receiving
thread
// If this.sMessage.txt is not there, it doesn't happen. Why????
// The exception says: ThreadException found while thread is being
aborted.
// I think it refers to the receiving thread.
this.cmdLabel.Enabled = true;
this.cmdReprint.Enabled = true
}
Thank you,
Carlos
|
| Author |
Message |
greensmachine_snake

|
ADO >> DataSet diffecences
Hello,
is there a simple method to get Rows which differ in their values between
two different DataSets?
Ondra.
DotNet128
|
| |
|
| |
 |
| |
 |
Index ‹ DotNet ‹ ADO |
- Next
- 1
- Visual C#.Net >> To Mitchell S. Honnerthttp://groups.google.com.pk/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/a28a501a72dce06d?hl=en
Continued from above:
I check out your lib and sample but I was unable to find how to perform
my desired task.:( I would be really thankful to you if you write a
sample code where sound and ID3 tags are synchronized with each other.
Thanks in Advance for ur help.
With best regards
Qumer
- 2
- 3
- ADO >> assigning null value to the Yes/No field of MS Access database tablehi
I want to assign null value to Yes/No field. So that the value of the field
of MS Access database table is neither YES nor NO. Is this possible? The
field properties show that there is a property called "Allow Null". I have
set it to TRUE. But this does not help.
I thereafter try to access this table from VB.NET and try to read the value
or insert a record with this field value as NULL. But when I read the record
as DBBoolean, I always get value as FALSE.
Can somebody throw some light on the same?
warm regards
Haresh Gujarathi
- 4
- Visual C#.Net >> Help running scriptI am trying to force my machine to run the Cscript engine against a vbs
script file. Why would the two act differently.
When I run the following code it does not execute the vbs script the same
way as the second option.
scriptConsoleProcess = new Process();
scriptConsoleProcess.StartInfo.FileName = "CScript.exe";
scriptConsoleProcess.StartInfo.Arguments = scriptPath;
scriptConsoleProcess.StartInfo.CreateNoWindow = true;
scriptConsoleProcess.Start();
This option works when I have the CScript set as my default engine.
scriptConsoleProcess = new Process();
scriptConsoleProcess.StartInfo.FileName = scriptPath;
scriptConsoleProcess.StartInfo.CreateNoWindow = true;
scriptConsoleProcess.Start();
- 5
- 6
- Visual C#.Net >> Beginner Question. What does the > mean? Not greater than.I was looking at this code, and have seen it in other code (like it):
/// <summary>
/// Bitmap font class for XNA
/// </summary>
public class BitmapFont
{
private SpriteBatch m_sb;
private Dictionary<int, BitmapInfo> m_dictBitmapID2BitmapInfo;
and like:
m_dictBitmapID2Texture = new Dictionary<int, Texture2D>(); //what's
the paren mean too?
What does the < > mean? What do I search on to understand what the
angle bracket symbols mean in a context like this? Thank you for any
help.
- 7
- Net Framework >> rotating pictures on the flyIs there a way in vb.net to, 1) detect if an image has been taken with a
> camera on a vertical axis, and 2) rotate the picture for display - across
> an
> intranet (asp.net), with huge files sizes (2 - 3 MB), that doesn't take
> too long?
> (LOL)
>
> Thanks,
> Jim
- 8
- Winforms >> Smart Client - IIS errorI'm writing the download stub for a Smart Client, following the QuickStart
samples that come with the Updater Block 2.0.
Tested against my local IIS, the stub works perfectly, but when I deploy it
to a server, I get "The system cannot find the file specified" in my browser.
Local Machine is IIS 6.0, Remote Server is IIS 5.0
Thanks for your help
- 9
- Visual C#.Net >> Mouse move eventsHi,
I have an MDI app that allows user to create flowcharts.
User can drag flowchart objects (squares, rectangles,
elipses, etc) from the toolbar and put on a form. They
should be able to move the objects around on the form.
This is where the problem is, I have implemented this
using the mouse_down, mouse_up and mouse_move events of
the form. When user selects a object, I receive the
mouse_down mesg, in which I save the current mouse
coordinates. When user drags the object around I receive
mouse move events, in which I compute the distance that
the mouse has moved and move the object by that distance.
When the object is moved, that itself generates new
mouse_move events in the opposite direction. Why are these
events generated and how can I prevent them?
Thanks,
Suhas
- 10
- Winforms >> Please help - how to call a web link in a windows form...Dear Experts,
I am asked to develop a Windows Application that calls to a given web link
(e.g. http://localhost/Test.aspx?id=1234) and catches the returned HTML from
this link (returned from web server of course). I really have no idea on how
to accomplish this. Could you please give me some hints on resolving this or
please indicate any resources/references that I can refer to?
Thanks a lot for your help.
Tigger
--
I am Tigger.
- 11
- Winforms >> Newbie question: how to set focus to a usercontrolI have a usercontrol that contains another usercontrol,
which in turn contains a PictureBox control.
Under a certain condition, I need to set the input
focus on the outermost usercontrol. But once the PictureBox
control (the outermost usercontrol's grandchild) has got
the input focus, I cannot transfer the focus back to the
outermost usercontrol (at least not by simply invoking its
Focus() member function).
Why is this? What can I do to take away the keyboard input
focus from that grandchild, the PictureBox control, and
transfer it back to the outermost usercontrol? (I have tried
to find information about keyboard focus handling that seems
relevant to this question, but what I have found seems rather
far removed from what I need to understand here...)
Note: My application requires very little keyboard input:
mainly a few keyboard-accelerators, and the copy/paste/
cut/delete key. But the copy/paste/cut/delete key must
go to the right usercontrol, because copy/paste/cut/delete
must be handled differently, depending on which usercontrol
has the input focus (or, rather, should have it, from my
point of view). In essence, I am trying to base input
focus on the position of the mouse pointer: if that grandchild
PictureBox control does not have the mouse pointer within
its bounds, it should not receive keyboard input, i.e.
should not have input focus.
Regards and thanks in advance for any enlightenment on
this question,
Christian
- 12
- Microsoft Project >> Percent Work CompleteWhat is the difference between % Complete and % Work
Complete? I have tasks where the two are wildly different
even though there are resources assigned. I have been
updating the % Complete only. Thanks for any advice.
- 13
- Visual C#.Net >> Using C# to create a scheduled jobI need to create an executible that will run on a nightly basis.
The executible is a simple command line statement like:
OSQL -Usa -PmyPasword -n -Q "BACKUP DATABASE msdb TO DISK =
'c:\msdb.dat_bak'"
Is it possible to use C# to create an executible that will run this command
line statement on a scheduled basis?
If so, can anyone give me some general ideas on how to go about this?
- 14
- Visual C#.Net >> about inheritanceHello!
Assume I have a base class called Base and a derived class called Sub.
Assume all the property for the Base class can't fit exactly for the Sub
class.
I mean some of the property for the Base class is wrong for the Sub class is
it then allowed
to inherit from class Base.
The main issue when using inheritance is that Sub is a Base.
//Tony
- 15
- Net Framework >> updating a shared files using Updater Applicatin BlockHi there,
I have about 20 applications.
There are many dll files that these applications share.
I want to avoid having the duplicated dll files.
Therefore, I crate a folder for these dll files.
Now I want to create an updater system using Updater Application Block.
I know that Updater Application Block is used to individually update
applications.
However, can I update an application along with some dll files in a shared
folder?
I would appreciate your feedback!
|
|
|