|
Maybe a casting problem?
It sounds like a DB problem, so if you want help, give us some more details to work with...
Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
Like his username and password?
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
Hi,
the code that calls the procedure is:
<br />
DataSet DS = new DataSet();<br />
SqlDataAdapter DAP = new SqlDataAdapter();<br />
SqlCommand cmd = new SqlCommand("P_SPB_CONSULTA_ENTRADA",m_Conexao1.SqlConnection);<br />
<br />
cmd.CommandType = CommandType.StoredProcedure;<br />
<br />
SqlParameter paramCdPasta = new SqlParameter("@cdPasta", SqlDbType.Int, 4);<br />
paramCdPasta.Value = cdPasta;<br />
cmd.Parameters.Add(paramCdPasta);<br />
<br />
SqlParameter paramNrCgc = new SqlParameter("@nrCgc", SqlDbType.VarChar, 8);<br />
paramNrCgc.Value = nrCgc;<br />
cmd.Parameters.Add(paramNrCgc);<br />
<br />
SqlParameter paramCdStatus = new SqlParameter("@cdStatus", SqlDbType.Int) ;<br />
paramCdStatus.Value = cdStatus;<br />
cmd.Parameters.Add(paramCdStatus);<br />
<br />
SqlParameter paramFlPeriodo = new SqlParameter("@flPeriodo", SqlDbType.Bit);<br />
paramFlPeriodo.Value = flPeriodo;<br />
cmd.Parameters.Add(paramFlPeriodo);<br />
<br />
SqlParameter paramDtDe = new SqlParameter("@dtDe", SqlDbType.VarChar, 20);<br />
paramDtDe.Value = dtDe;<br />
cmd.Parameters.Add(paramDtDe);<br />
<br />
SqlParameter paramDtAte = new SqlParameter("@dtAte", SqlDbType.VarChar, 20);<br />
paramDtAte.Value = dtAte;<br />
cmd.Parameters.Add(paramDtAte);<br />
<br />
SqlParameter paramFlViu = new SqlParameter("@flVisao", SqlDbType.Bit);<br />
paramFlViu.Value = flViu;<br />
cmd.Parameters.Add(paramFlViu);<br />
<br />
SqlParameter paramCdBanco = new SqlParameter("@cdBanco", SqlDbType.Int, 4);<br />
paramCdBanco.Value = cdBanco;<br />
cmd.Parameters.Add(paramCdBanco);<br />
<br />
SqlParameter paramCdUsuario = new SqlParameter("@cdUsuario", SqlDbType.Int, 4);<br />
paramCdUsuario.Value = cdUsuario;<br />
cmd.Parameters.Add(paramCdUsuario);<br />
<br />
SqlParameter paramCdDominio = new SqlParameter("@cdDominio", SqlDbType.Int, 4);<br />
paramCdDominio.Value = cdDominio;<br />
cmd.Parameters.Add(paramCdDominio);<br />
<br />
SqlParameter paramCdAgencia = new SqlParameter("@cdAgencia", SqlDbType.Int, 4);<br />
paramCdAgencia.Value = cdAgencia;<br />
cmd.Parameters.Add(paramCdAgencia);<br />
<br />
SqlParameter paramCdAgenciaS = new SqlParameter("@agencias", SqlDbType.VarChar,3000);<br />
paramCdAgenciaS.Value = Session["spb.strAgencias"];<br />
cmd.Parameters.Add(paramCdAgenciaS);<br />
<br />
SqlParameter paramDominios = new SqlParameter("@dominios", SqlDbType.VarChar,3000);<br />
paramDominios.Value = Session["spb.strDominios"];<br />
cmd.Parameters.Add(paramDominios);<br />
<br />
SqlParameter paramValor = new SqlParameter("@valor_de", SqlDbType.Money, 30);<br />
paramValor.Value = valor;<br />
cmd.Parameters.Add(paramValor);<br />
<br />
SqlParameter paramValor2 = new SqlParameter("@valor_ate", SqlDbType.Money, 30);<br />
paramValor2.Value = valor;<br />
cmd.Parameters.Add(paramValor2);<br />
<br />
SqlParameter paramPagatu = new SqlParameter("@pagina", SqlDbType.Int);<br />
paramPagatu.Value = (pagina == 0) ? pagina + 1 : pagina;
cmd.Parameters.Add(paramPagatu);<br />
<br />
SqlParameter paramQuant = new SqlParameter("@quant", SqlDbType.Int);<br />
paramQuant.Value = DataGrid1.PageSize;<br />
cmd.Parameters.Add(paramQuant);<br />
<br />
SqlParameter paramFiltro = new SqlParameter("@filtro", SqlDbType.VarChar);<br />
if (Session["Sort"] == null || Session["Sort"].ToString() == "" || Session["Sort"].ToString().ToLower() == "null")<br />
Session["Sort"] = "HORA";<br />
if (Session["SortType"] == null || Session["SortType"].ToString() == "" || Session["SortType"].ToString().ToLower() == "null")<br />
Session["SortType"] = "DESC";<br />
paramFiltro.Value = Session["Sort"].ToString() + " " + Session["SortType"].ToString();<br />
cmd.Parameters.Add(paramFiltro);<br />
<br />
m_Conexao1.SqlAbre(Session["spb.OleDbConString"].ToString());<br />
DAP.SelectCommand = cmd;<br />
DAP.SelectCommand.Connection = m_Conexao1.SqlConnection;<br />
DAP.TableMappings.Add("Table","entradas");<br />
DAP.Fill(DS,"entradas");<br />
m_Conexao1.SqlFecha();<br />
<br />
return DS;
We noticed that sometimes the code works fine, sometimes it return a Timeout expired message.
thanks for any help.
marcelo
|
|
|
|
|
WOW! What does this exactly do?
I still have a hunch about a casting problem somewhere, or perhaps increase your SQL timeout in the connection string, sorry my SQL knowledge is a bit scary
Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
According to OleDbErr.h, DB_E_ABORTLIMITREACHED is returned when "Execution stopped because a resource limit was reached. No results were returned."
So something you are doing in your DataAdapter is taking up all the resources available.
Not much help, but you might be able to figure out whats going on from that.
James
Sig code stolen from David Wulff
|
|
|
|
|
Hi,
I'm a newbie to C# programming and .NET framework.
I have the following q's
1. Can i send the SOAP/HTTP request to apache server
(apache doesnt host a web service(in this case)
2. I need to extract the SOAP message by the extension module (i have written for apache) and forward it to my Appserver?
All i need is a way to send SOAP request to Apache which should be processed by the extension module.
I tried using C# client with configuration options of the client as follows (there is no .NET server)
<configuration>
<system.runtime.remoting>
<application name="AdderClient">
<client url="http://<ip-addr>/RemotingAdder">
<wellknown type="Adder.AdderService, Adder" url="http://<ipaddr>/RemotingAdder/AdderService.soap" />
</client>
<channels>
<channel ref="http client" />
</channels>
</application>
</system.runtime.remoting>
</configuration>
Is there any configuration changes needed on Apache server?
Please clarify.
Thanks,
sathya
|
|
|
|
|
I want to sync the scroll of two scroll bars on two panels on the same form, any snippets of code around to do this ? Or hints ?
- James McCutcheon
|
|
|
|
|
A panel class derives from System.Windows.Forms.ScrollableControl and, as such, exposes methods such like SetDisplayRectLocation(x,y) to move programmatically a scrollbar.
The panel WndProc also manages standard WM_HSCROLL(0x0114) and WM_VSCROLL(0x0115) messages sent because of interaction : you may in turn create such messages to move the current position.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
What is the equivalent to vector or CStringArray in C#?
|
|
|
|
|
System.Collections.ArrayList
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
Even more to the point
System.Collection.Specialized.StringCollection
James
Sig code stolen from David Wulff
|
|
|
|
|
I've built a C# FolderTreeView control, and uploaded it here: http://www.codeproject.com/useritems/FolderTreeView.asp[^]
As stated in the known limitations, I cannot figure out how to get a Shell32.FolderItem of the Shell32.ShellSpecialFolderConstants.ssfDESKTOP constant. What this means is that although my control works great (well, does for me it cannot start at the Desktop like Windows Explorer does
Can anyone help?
|
|
|
|
|
In fact, comparing to Windows Explorer, what the tree control is missing is the actual Explorer namespaces.
Fortunately, they are easy to lookup. See this article[^].
In short, default namespaces (MyComputer, MyDocuments, Recyclebin, network neighbourhood, Internet Explorer, and Control panel) are all accessed through this registry scheme :
HKEY_LOCAL_MACHINE
Software
Microsoft
Windows
CurrentVersion
Explorer
Virtual Folder Name
Namespace
{Extension CLSID}
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
Thanks Stephane, but what I need is a Shell32.FolderItem object. Does anyone know how to create this from a string path?
|
|
|
|
|
Furty wrote:
a string path
You must be kidding. You have the namespace CLSID to play with.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
StephaneRodriguez wrote:
You must be kidding
I'm afraid not
StephaneRodriguez wrote:
You have the namespace CLSID to play with.
Right now it may as well be a nuclear bomb to play with
I'm a begginner, and have zero experience with anything other than C# and .NET. So basically I have no idea what to do with the CLSID, all I know is that to achieve the result I want, I need a Shell32.FolderItem object that represents the virtual desktop folder. Please excuse my newbie-ness
Thanks for the help.
|
|
|
|
|
It's not a matter of being a beginner. There are several articles about it in MSDN/MSJ. I would start doing it in C++ first (because the code snippets you'll find are in C++), then do it in C#.
If we rewind the discussion to the beginning, what is the aim of your article ? Carlos's article actually show folders, namespaces, whatever you see in Windows Explorer. The only bad fact about it is it comes with an external control which is limiting because you have to distribute it as well. And actually is ready to do more things (which in turn may be useless for a lot of people). But heck, what about submitting Carlos its revamped tree control, thin, reusable, and with no external control at all ?
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
Ok, I am working on writing a forum control and when I try to compile (command line) something very simple I get a slew of errors. This is what the code behind portion has right now, any thoughts? As soon as I comment out the constructor and the Page_Init event everything compiles ok, however when I move the dll file that is created over to the bin, the word "Hello" isn't printed to the screen.
using System;
using System.Collections;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.IO;
namespace DeveloperNotesForum
{
public class Forum:System.Web.UI.Page
{
public Forum
{
Page.Init += new System.EventHandler(Page_Init);
}
private void Page_Load(object sender, EventArgs e)
{
Response.Write("Hello");
}
private void Page_Init(object sender, EventArgs e)
{
InitializeComponent();
}
}
}
The errors look like this:
<br />
error CS1519: Invalid token "{" in class, struct, or interface member declaration.<br />
Nick Parker
The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown
|
|
|
|
|
Your EventHandler is declared with the method name Page_Init and your method is Page_Int. Hope that helps.
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
Thanks, I missed the i, however that didn't do it, I copied the errors I was getting from the command line compiler, any more thoughts:
<br />
<br />
C:\Inetpub\wwwroot>csc /target:library forum.aspx.cs<br />
Microsoft (R) Visual C# .NET Compiler version 7.00.9466<br />
for Microsoft (R) .NET Framework version 1.0.3705<br />
Copyright (C) Microsoft Corporation 2001. All rights reserved.<br />
<br />
forum.aspx.cs(16,3): error CS1519: Invalid token '{' in class, struct, or<br />
interface member declaration<br />
forum.aspx.cs(17,14): error CS1519: Invalid token '+=' in class, struct, or<br />
interface member declaration<br />
forum.aspx.cs(17,40): error CS1519: Invalid token '(' in class, struct, or<br />
interface member declaration<br />
forum.aspx.cs(17,50): error CS1519: Invalid token ')' in class, struct, or<br />
interface member declaration<br />
forum.aspx.cs(21,3): error CS0116: A namespace does not directly contain members<br />
such as fields or methods<br />
forum.aspx.cs(34,1): error CS1022: Type or namespace definition, or end-of-file<br />
expected<br />
<br />
C:\Inetpub\wwwroot><br />
Nick Parker
The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown
|
|
|
|
|
Your constructor needs to be named public Forum ()
Does that work? I put it into a cs file in VS.NET and it wasn't formatting correctly, that's when I noticed that you need the parens.
If you're going to be doing a lot of ASP.NET, then you may want to look into getting VS.NET. Or if you can't afford that, then you should look into getting WebMatrix from www.asp.net[^] It's free too.
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
David Stone wrote:
Does that work?
Yep, that pretty much did it.
David Stone wrote:
If you're going to be doing a lot of ASP.NET, then you may want to look into getting VS.NET. Or if you can't afford that, then you should look into getting WebMatrix from www.asp.net[^] It's free too.
Actually I have both , however I am trying to learn all the nitty gritty parts to it by doing it by hand. The IDE holds your hand through a lot of it. Thanks David.
Nick Parker
The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown
|
|
|
|
|
Nick Parker wrote:
Actually I have both , however I am trying to learn all the nitty gritty parts to it by doing it by hand.
So much for RAD
Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
Nick Parker wrote:
Thanks David.
No problem.
Nick Parker wrote:
Actually I have both , however I am trying to learn all the nitty gritty parts to it by doing it by hand. The IDE holds your hand through a lot of it.
Eeew. I like being able to do the stuff by hand as well, but after years of doing HTML/ASP/JavaScript by hand because there wasn't any really good IDE, I love being able to work in VS.NET.
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
1) How do I cause a certain tab in my tab control to be automatically selected when a user does the follow:
a) Clicks an option in the Tree Control.
b) Clicks an option in from the Menu on the top toolbar.
2) I have implemented an outlook type toolbar. When a user selects an option by clicking an icon or tree control option how do I clear the current form (Saving form settings) and casuing the new form to appear. (I use the term form lightly) I'm trying to get a similar action like a tab control, but without using the tab control, and using the outlook toolbar for selection.
|
|
|
|
|