Latest News | Discussions | Hire a developer | Advertising | Contact Us
 Search   
  Latest News
Newbie, ODBC, CRecordSet not adding new record on ONE WinXP Build 520 machine, however works on other machines, and ExecuteSQL always works
microsoft.public.dotnet.languages.vc.libraries
Hi,

I have a very puzzling problem, and am hoping someone can help. I have a
VC7.1++ VS2003, program which uses ODBC to connect to a SQLAnywhere 6.0
database. This program has been working without fail for many years,
however the problem that I am now running into is that on one WinXP machine
the CRecordset is not adding a new record, the really odd thing is that if
I first add one record to the table using the ExecuteSQL( insert into... ),
which always seems to work, then the recordset addnew seems to work moving
forward.

I've included a code sniplet below, any help would be very much apprecuated
as this is very frustrating...


/* This adds a records correctly*/
CString cSQL;
cSQL.Format( "INSERT INTO Templates (TemplateName, TemplateID) VALUES ('test
write', 9999)");
m_pdatabase->ExecuteSQL( cSQL );


/* this does NOT add a new record unless one already exists within the
table, nor does it throw an exception*/
try
{
CRecsetTemplates* pRST2 = new CRecsetTemplates( m_pdatabase );
pRST2->Open();
pRST2->AddNew();
pRST2->m_TemplateName = "TEST TEMPLATE!!!!";
pRST2->m_TemplateID = 9999;
pRST2->Update();
pRST2->Close();
delete pRST2;
}
catch(CDBException* e)
{
e->ReportError();
e->Delete();
}



Error on LinearGradientBrush
microsoft.public.dotnet.framework.windowsforms.designtime
Hello

I found an abnormal behaviour on LinearGradientBrush (or FillRectangle).
This code

Public Class PanelPanel
Inherits System.Windows.Forms.Panel
Protected Overrides Sub OnPaint(ByVal e As
System.Windows.Forms.PaintEventArgs)
Dim rect As System.Drawing.Rectangle = New
System.Drawing.Rectangle(10, 10, Me.Width - 20, Me.Height - 20)
Dim gradientBrush As System.Drawing.Drawing2D.LinearGradientBrush
gradientBrush = New System.Drawing.Drawing2D.LinearGradientBrush(rect, _
System.Drawing.Color.Gray, _

System.Drawing.Color.FloralWhite, _

System.Drawing.Drawing2D.LinearGradientMode.Vertical)
e.Graphics.FillRectangle(gradientBrush, rect)
End Sub
End Class

generates a control with an rectangle drawn inside.
The problem is that an unusual line (colored Color.FloralWhite) appears on
the top edge of the rectangle. This line should not be there.
If LinearGradientMode id other than Vertical the problem persists, but it is
less visible (only a small colored pixel is visible).

Please note that the anomaly appears only with some rectangle sizes. Example:
if rect={X=10,Y=10,Width=304,Height=208} 'equivalent to a Me.Size=New
Size(324,228) - Anomaly visible
if rect={X=10,Y=10,Width=304,Height=216} 'Correct, anomaly not visible

Could someone PLEASE try to reproduce the problem (just copy code as is) and
confirm that is an error and then reason with me??

Thank you!.

Carlo

(MCP)



Can I use Application Center Test for web service stress test?
microsoft.public.dotnet.framework.aspnet.webservices
Hi,

Can I use Microsoft Application Center Test for Web Service stress test? Is
it a right tool to do web service stress test?

Do we use the same tool in VS 2005?

Thank you,
Alan



calling web service at runtime and use there methods code reuiredin C# windows app
microsoft.public.dotnet.framework.webservices.enhancements
Hi

I want to Add Web Service in the Runtime and Get there Method too

Mean i want to Add Web Servies in runtime add as a Parent Node in TreeView
Control and Web Servies Method add in Parant's Child Node.

then want when i drag & drop method to winForm method will me able to use on
the Runtime

Maverick




Retrieving Roles
microsoft.public.dotnet.framework.aspnet.security
Hi Experts,

I am using C# / ADSI in my ASP.Net application. I want to implement role
based security in my application. I want to make restrictions in my
application based on the groups which the user belongs. I am using a custom
Login page and not windows integrated authentication. The user enters a
valid userid and password to login.

Can anyone tell me how to get the roles of the logged in user.

Thanx in Advance
Regards


Newbie, ODBC, CRecordSet not adding new record on ONE WinXP Build 520 machine, however works on other machines, and ExecuteSQL always works
microsoft.public.dotnet.languages.vc
Hi,

I have a very puzzling problem, and am hoping someone can help. I have a
VC7.1++ VS2003, program which uses ODBC to connect to a SQLAnywhere 6.0
database. This program has been working without fail for many years,
however the problem that I am now running into is that on one WinXP machine
the CRecordset is not adding a new record, the really odd thing is that if
I first add one record to the table using the ExecuteSQL( insert into... ),
which always seems to work, then the recordset addnew seems to work moving
forward.

I've included a code sniplet below, any help would be very much apprecuated
as this is very frustrating...


/* This adds a records correctly*/
CString cSQL;
cSQL.Format( "INSERT INTO Templates (TemplateName, TemplateID) VALUES ('test
write', 9999)");
m_pdatabase->ExecuteSQL( cSQL );


/* this does NOT add a new record unless one already exists within the
table, nor does it throw an exception*/
try
{
CRecsetTemplates* pRST2 = new CRecsetTemplates( m_pdatabase );
pRST2->Open();
pRST2->AddNew();
pRST2->m_TemplateName = "TEST TEMPLATE!!!!";
pRST2->m_TemplateID = 9999;
pRST2->Update();
pRST2->Close();
delete pRST2;
}
catch(CDBException* e)
{
e->ReportError();
e->Delete();
}



Adding rows to a Tablecontrol does not save in viewstate
microsoft.public.dotnet.framework.aspnet.webcontrols
I'm Using ASP.Net 2.0 and VS2005 RC.
I've added a TableControl and a Wizard Control to my ASP.Net Page.
When i Click Finish on the wizard I do the following code:

TableRow tr = new TableRow();
TableCell tc = new TableCell();
tc.Text = "TEST";
tr.Cells.Add(tc);
Table1.Rows.Add(tr);

And a TEST row is added to the table, but when I jump back to step 1 of the
wizard or do anything else that reloads the page, the TEST row is deleted
again. I have enabled viewstate on the table control. Why is my test row
disappearing? And how can I make the TEST row stay, even after page reloads?

Kind Regards,
Allan Ebdrup



GPSAccess Library released for PocketPC
microsoft.public.dotnet.framework.compactframework
High Point Software has released its new GPSAccess library for PocketPC GPS
developers. GPSAccess builds on our proven BTAccess library to seamlessly
integrate Bluetooth-enabled GPS receivers into any .Net application. A
single call to the GPS.Start method searches for and connects to Bluetooth
GPS receivers without program or user intervention - no more annoying popup
screens. Other features include data caching, continuous or periodic
connections, automatic reconnection after powercycle, and a unique
"GeoFencing" notification mechanism . For complete details visit
www.high-point.com.

--

Tim Johnson
High Point Software, Inc.



Tool tip for picture boxes in C#
microsoft.public.dotnet.framework.compactframework
Hi friends,

I wanna place a tool-tip for my picture box in WindowsCE.NET using C#. I
know that this will not support tool-tip property directly.

Is there any other way to achieve this.

Please help me out. Thanks in advance.

HRK-Chennai

Re-Post
microsoft.public.dotnet.framework.adonet
I tried to post this about an hour ago but it never appeared on the NG so I
am trying again.

I have a set of aspx pages in which I am having some strange problems
relating to a connection. I'll focus on just one of the problems here. (See
code below). If I include the Close method for the connection as shown
below, the ExecuteScalar fails with an error that the connection is Closed.
If I comment out the Close, it works? I don't understand what is happening
here?


================= Code =================
If CommonClass.myConn.State.Closed Then

CommonClass.CreateConnection()

CommonClass.myConn.Open()

End If

Dim strSQL As String

strSQL = "Select Count(BandID) From JudgeEvals Where JudgeID = " &
Session("CurrJudgeID") _

& " AND EventID = '" & Session("strCurrEventID") & "' AND BandID = " &
Session("CurrBandID")

Dim cmd1 As New OleDb.OleDbCommand(strSQL, CommonClass.myConn)

Dim intRecCount As Int16 = cmd1.ExecuteScalar

CommonClass.myConn.Close <==== Problem here

If intRecCount > 0 Then 'This unit has already evaluate this judge at this
event

lblInfo.Text = "This band has already evaluated this judge for this event!"

lblInfo.Visible = True

Exit Sub

End If





common code behind pages
microsoft.public.dotnet.framework.aspnet
I am working in VS 2003, using VB.NET.

I have a series of pages with forms on them, an application for a DOT
number for motor carriers. The code behind them iterates through the
controls on the form, each of which have the same id as the field in
the SQL Server database they post to, so I don't have to get the data
from each field specifically.

So I use the same code for each page. I have tried to set the
CodeBehind to point to that page, but VS.NET keeps creating new
.aspx.vb pages when I create a new page and somehow attaches
the page to the wrong CodeBehind. The project runs, but I keep getting
compiler errors.

In the old days, I'd just edit the make file... sigh.

Where are these bogus pages getting attached?

here's the compiler error:

C:\Inetpub\wwwroot\MCCI\MCCIFormPg4.aspx.vb Unable to open module file
'C:\Inetpub\wwwroot\MCCI\MCCIFormPg4.aspx.vb': The system cannot find
the file specified.

here's the CodeBehind statement from MCCIFormPg4.aspx:

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="MCCIForm.aspx.vb" Inherits="MCCI.MCCI"%>

Not only that, but whenever I make a new page, it adds a new class to
the list for that page. I don't want this - I want them to use the same
class. I guess I should have made a distinct class to hold the code
that parses the fields, and let VS.NET create it's own classes, and
then imported the generic class into the page itself... maybe I should
RTFM.


what's the best way...
microsoft.public.dotnet.framework.aspnet
hey all,

i have a combo of dropdownlists and a textbox that allows a user to filter
her dataset for a datagrid on a webform. the way i'm doing it now is i have
an array that i pass from the ui, thru the business layer, into the data
access layer so i can build my SQL statement dynamically. i have public enums
that describe the contents of my array both on the ui and on the
dataaccesslayer.

does this sound ok to do, or is there a better (preferred way)? does this
sound too coupled?

thanks,
ari

Getting Application Path Physical location
microsoft.public.dotnet.framework.aspnet
I have a problem in getting asp.net application physical path in global.ascx
static function

in my global.ascx i have a static function :
first i tried to get the physical path by refelection using

string rootPath =
Path.GetDirectoryName(System.Refelection.Assmebly.GetExecutingAssembly().Location);
but the problem it returned a path in temprary folder in
/winnt/framework/ver/temporay asp.net files ..i do not know why?

then i tried Server.MapPath but exception occured with following message
System.Web.HttpException: Server operation is not available in this context.


what should I do to get aspnet application physical path?


using session cookie to redirect page
microsoft.public.dotnet.framework.aspnet
Hello pals,

I have one problem, how to redirect the user from intro page to the main
page, once user visits the site. If user visitng first time the intro page
has to be shown, then further navigation he clikcs the home, he should not go
the intro page he has to reidrect to main page.

The cookie has to be writen in the intro page or main page. if in intro page
how to redirect to the main page without loading the intro page.

How it can be write.. I am not expritse in the asp.net.. please any help

thanx

detailed reference books with asp.net and c#
microsoft.public.dotnet.framework.aspnet
Hi all,

I'm searching for a few good books on asp.net and c#. I'm afraid of buying
books here in denmark that i cant read though before i get them, becuase 90%
of them are just pure junk. I dont need 3 chapters on object oriented
programming or c# inside a asp.net book.

Looking mainly for reference books or tactics books that would cover all
aspects of asp.net, like security, controls, session managment, web.config
and so on.




ASP.Net Class Import problems
microsoft.public.dotnet.framework.aspnet
Heya,
I might be going about this in completely the wrong fasion, I am more
of a PHP developer, but I am trying to build a collection of classes in
ASP.Net to implement in some aspx pages but also in other classes.
I can make an aspx page reference a class Class1 in namespace
NameSpace1 using

<%@ Assembly Src="../App_Code/NameSpace1.vb" %>

I also have a class in another file called DBConn which is in
NameSpace2. Intellisense lets me add 'Imports NameSpace2' or 'Imports
NameSpace2.DBConn' but when I reload the page I get

BC30466: Namespace or type 'NameSpace2' for the Imports 'NameSpace2'
cannot be found.

OR

'BC30466: Namespace or type 'DBconn' for the Imports
'NameSpace2.DBconn' cannot be found.

What am I doing wrong, what is the best way of includign one class
within another.. any help would be much appreciated!!


microsoft.public.dotnet.academicmicrosoft.public.dotnet.academic.assignment_manager
microsoft.public.dotnet.datatoolsmicrosoft.public.dotnet.distributed_apps
microsoft.public.dotnet.faqsmicrosoft.public.dotnet.framework
microsoft.public.dotnet.framework.adonetmicrosoft.public.dotnet.framework.aspnet
microsoft.public.dotnet.framework.aspnet.announcementsmicrosoft.public.dotnet.framework.aspnet.buildingcontrols
microsoft.public.dotnet.framework.aspnet.cachingmicrosoft.public.dotnet.framework.aspnet.datagridcontrol
microsoft.public.dotnet.framework.aspnet.mobilemicrosoft.public.dotnet.framework.aspnet.security
microsoft.public.dotnet.framework.aspnet.webcontrolsmicrosoft.public.dotnet.framework.aspnet.webservices
microsoft.public.dotnet.framework.clrmicrosoft.public.dotnet.framework.compactframework
microsoft.public.dotnet.framework.component_servicesmicrosoft.public.dotnet.framework.drawing
microsoft.public.dotnet.framework.interopmicrosoft.public.dotnet.framework.odbcnet
microsoft.public.dotnet.framework.performancemicrosoft.public.dotnet.framework.remoting
microsoft.public.dotnet.framework.sdkmicrosoft.public.dotnet.framework.setup
microsoft.public.dotnet.framework.webservicesmicrosoft.public.dotnet.framework.webservices.enhancements
microsoft.public.dotnet.framework.windowsformsmicrosoft.public.dotnet.framework.windowsforms.controls
microsoft.public.dotnet.framework.windowsforms.databindingmicrosoft.public.dotnet.framework.windowsforms.designtime
microsoft.public.dotnet.framework.wmimicrosoft.public.dotnet.general
microsoft.public.dotnet.internationalizationmicrosoft.public.dotnet.languages.csharp
microsoft.public.dotnet.languages.jscriptmicrosoft.public.dotnet.languages.vb
microsoft.public.dotnet.languages.vb.controlsmicrosoft.public.dotnet.languages.vb.data
microsoft.public.dotnet.languages.vb.upgrademicrosoft.public.dotnet.languages.vc
microsoft.public.dotnet.languages.vc.librariesmicrosoft.public.dotnet.myservices
microsoft.public.dotnet.scriptingmicrosoft.public.dotnet.security
microsoft.public.dotnet.vjsharpmicrosoft.public.dotnet.vsa
microsoft.public.dotnet.xml

Loans
Bankruptcy
File Sharing
The eBay Song
Credit Cards

© 2005 - 2008, dotNetFire.com