Showing posts with label type. Show all posts
Showing posts with label type. Show all posts

Thursday, March 29, 2012

Office Web Components

Hi!!,

I have tried to generate Excell grafics using OWC10 dll. In my asp.net page,
i have a dropdownlist where i can select the type of the grafic, a
linkbutton where i can clik to generate the grafic, and a Image WebControl
where i show the grafic, but i have a problem. The first time i click the
linkbutton, it show the grafic correctly, but when i click more times,
although the grafic has been generated correctly ,the image show the first
grafic.

How can resolve this?

thank you very much.

P.D.: I hope explain it well. Sorry for my bad english.

--

Julin Sanz
Salamanca (Espaa)You need to have unique names for your graph otherwise it overwrites the
last image.
window.open('graph.aspx','this needs to be a unique name'...

you can get unique names by using this line of code
System.Text.RegularExpressions.Regex.Replace(DateT ime.Now.ToString(),"\\D","
")

--

----
Got TidBits?
Get it here: www.networkip.net/tidbits
"Julian Sanz" <jsanzg@.gpm.es> wrote in message
news:e158gDsnDHA.360@.TK2MSFTNGP12.phx.gbl...
> Hi!!,
> I have tried to generate Excell grafics using OWC10 dll. In my asp.net
page,
> i have a dropdownlist where i can select the type of the grafic, a
> linkbutton where i can clik to generate the grafic, and a Image WebControl
> where i show the grafic, but i have a problem. The first time i click the
> linkbutton, it show the grafic correctly, but when i click more times,
> although the grafic has been generated correctly ,the image show the first
> grafic.
> How can resolve this?
> thank you very much.
> P.D.: I hope explain it well. Sorry for my bad english.
> --
> Julin Sanz
> Salamanca (Espaa)
well, i save the grafic in a image filethat it names "grafico.gif". When I
generate the image, i overwrite the last grafic, this is what i want, but
the asp.net page show the first image. When i refresh the page with the
refresh button of the explorer, it shows the correctly image. I understand
you that i have to create a diferent image file for each grafic, these image
files have to have diferents names. Have i understand you well?

"Alvin Bruney" <vapordan_spam_me_not@.hotmail_no_spamhotmail.com> escribi en
el mensaje news:uR8Sf6wnDHA.688@.TK2MSFTNGP10.phx.gbl...
> You need to have unique names for your graph otherwise it overwrites the
> last image.
> window.open('graph.aspx','this needs to be a unique name'...
> you can get unique names by using this line of code
System.Text.RegularExpressions.Regex.Replace(DateT ime.Now.ToString(),"\\D","
> ")
>
> --
>
> ----
> Got TidBits?
> Get it here: www.networkip.net/tidbits
> "Julian Sanz" <jsanzg@.gpm.es> wrote in message
> news:e158gDsnDHA.360@.TK2MSFTNGP12.phx.gbl...
> > Hi!!,
> > I have tried to generate Excell grafics using OWC10 dll. In my asp.net
> page,
> > i have a dropdownlist where i can select the type of the grafic, a
> > linkbutton where i can clik to generate the grafic, and a Image
WebControl
> > where i show the grafic, but i have a problem. The first time i click
the
> > linkbutton, it show the grafic correctly, but when i click more times,
> > although the grafic has been generated correctly ,the image show the
first
> > grafic.
> > How can resolve this?
> > thank you very much.
> > P.D.: I hope explain it well. Sorry for my bad english.
> > --
> > Julin Sanz
> > Salamanca (Espaa)

Thursday, March 22, 2012

OleDbException: Data type mismatch in criteria expression.

Using Access db with VS2008 (ASP.NET/VB.NET)...
On the INSERT command I get this error: System.Data.OleDb.OleDbException:
Data type mismatch in criteria expression.
I haven't found a solution yet in my research. Any idea what I might be
missing?
**************
Datasource setup as follows:
<asp:AccessDataSource ID="AccessDataSource1"
runat="server"
DataFile="~/BeachFuneral.mdb"
InsertCommand="INSERT INTO [ObitComments]
([ObitId], [CommentBy], [CommentEmail], [CommentRelation],
[CommentApproved], [CommentDateTime], [ObitComment]) VALUES (?, ?, ?, ?, ?,
?, ?)" >
<InsertParameters>
<asp:Parameter Name="ObitId" />
<asp:Parameter Name="CommentBy" />
<asp:Parameter Name="CommentEmail" />
<asp:Parameter Name="CommentRelation" />
<asp:Parameter Name="CommentApproved" />
<asp:Parameter Name="CommentDateTime" />
<asp:Parameter Name="ObitComment" />
</InsertParameters>
</asp:AccessDataSource>
**************
Code to insert as follows:
With Me.AccessDataSource1
.InsertParameters("ObitId").DefaultValue =
Request.QueryString("Id")
.InsertParameters("CommentBy").DefaultValue =
Me.txtFullName.Text
.InsertParameters("CommentEmail").DefaultValue =
Me.txtEmail.Text
.InsertParameters("CommentRelation").DefaultValue =
Me.txtRelationship.Text
.InsertParameters("CommentApproved").DefaultValue = True
.InsertParameters("CommentDateTime").DefaultValue = Now.ToString
.InsertParameters("ObitComment").DefaultValue =
Me.txtComment.Text
End With
Try
Me.AccessDataSource1.Insert()
Catch ex As Exception
Response.Write(ex.ToString)
Exit Sub
Finally
' if ok then move on...
Response.Redirect("Obit.aspx?Id=" & Request.QueryString("Id"))
End TryYou have not identified what data types your database is using, either in
this message, or in your code. However, you are attemtping to insert all
string values (text data type), with the exception of one field
(CommentApproved) which you are inserting a boolean value into. So, unless
all of the fields in the table are text except for that one, you would
certainly get that exception.
HTH,
Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP
"Bobby Edward" <test@.test.com> wrote in message
news:OkUo0QofIHA.288@.TK2MSFTNGP02.phx.gbl...
> Using Access db with VS2008 (ASP.NET/VB.NET)...
> On the INSERT command I get this error: System.Data.OleDb.OleDbException:
> Data type mismatch in criteria expression.
> I haven't found a solution yet in my research. Any idea what I might be
> missing?
> **************
> Datasource setup as follows:
> <asp:AccessDataSource ID="AccessDataSource1"
> runat="server"
> DataFile="~/BeachFuneral.mdb"
> InsertCommand="INSERT INTO [ObitComments]
> ([ObitId], [CommentBy], [CommentEmail], [CommentRelation],
> [CommentApproved], [CommentDateTime], [ObitComment]) VALUES (?, ?, ?, ?,
> ?, ?, ?)" >
> <InsertParameters>
> <asp:Parameter Name="ObitId" />
> <asp:Parameter Name="CommentBy" />
> <asp:Parameter Name="CommentEmail" />
> <asp:Parameter Name="CommentRelation"
> />
> <asp:Parameter Name="CommentApproved"
> />
> <asp:Parameter Name="CommentDateTime"
> />
> <asp:Parameter Name="ObitComment" />
> </InsertParameters>
> </asp:AccessDataSource>
> **************
> Code to insert as follows:
> With Me.AccessDataSource1
> .InsertParameters("ObitId").DefaultValue =
> Request.QueryString("Id")
> .InsertParameters("CommentBy").DefaultValue =
> Me.txtFullName.Text
> .InsertParameters("CommentEmail").DefaultValue =
> Me.txtEmail.Text
> .InsertParameters("CommentRelation").DefaultValue =
> Me.txtRelationship.Text
> .InsertParameters("CommentApproved").DefaultValue = True
> .InsertParameters("CommentDateTime").DefaultValue =
> Now.ToString
> .InsertParameters("ObitComment").DefaultValue =
> Me.txtComment.Text
> End With
> Try
> Me.AccessDataSource1.Insert()
> Catch ex As Exception
> Response.Write(ex.ToString)
> Exit Sub
> Finally
> ' if ok then move on...
> Response.Redirect("Obit.aspx?Id=" & Request.QueryString("Id"))
> End Try
>
>

Friday, March 16, 2012

On a dropdown, when you type letter it helpfully selects relateditem. How can I slow the t

On my dropdown, if I type it automatically goes to a related item that
matches what I type - so long as whatever I type takes less then one
second.

How can I extend this timeout ?

(I have slow typing users)

many many thanks and 10 free internets to whoever posts the correct
answer = )

Regards,
HamstersHi,

Do you mean that "feature" of the DropDownList that goes to the first
item matching the first letter typed?

Or the type extender from the AjaxControlToolKit?

If you're refering to the standard DDL, I think that the only way to
change this time would be editing the registry.

However if you're using the extender you'd need to change the code of
the extender.

I have not used the extender yet, so I can't give you a more precise
information about it. I'll check it over the weekend and I can get bat
at ya.

Regards,

Paulo Santos
http://pjondevelopment.50webs.com
On Nov 22, 3:31 pm, anonymoushamster <anonymoushams...@.gmail.com>
wrote:

Quote:

Originally Posted by

On my dropdown, if I type it automatically goes to a related item that
matches what I type - so long as whatever I type takes less then one
second.
>
How can I extend this timeout ?
>
(I have slow typing users)
>
many many thanks and 10 free internets to whoever posts the correct
answer = )
>
Regards,
Hamsters

On a dropdown, when you type letter it helpfully selects related

On my dropdown, if I type it automatically goes to a related item that
matches what I type - so long as whatever I type takes less then one
second.
How can I extend this timeout ?
(I have slow typing users)
many many thanks and 10 free internets to whoever posts the correct
answer = )
Regards,
HamstersHi,
Do you mean that "feature" of the DropDownList that goes to the first
item matching the first letter typed?
Or the type extender from the AjaxControlToolKit?
If you're refering to the standard DDL, I think that the only way to
change this time would be editing the registry.
However if you're using the extender you'd need to change the code of
the extender.
I have not used the extender yet, so I can't give you a more precise
information about it. I'll check it over the wend and I can get bat
at ya.
Regards,
Paulo Santos
http://pjondevelopment.50webs.com
On Nov 22, 3:31 pm, anonymoushamster <anonymoushams...@.gmail.com>
wrote:
> On my dropdown, if I type it automatically goes to a related item that
> matches what I type - so long as whatever I type takes less then one
> second.
> How can I extend this timeout ?
> (I have slow typing users)
> many many thanks and 10 free internets to whoever posts the correct
> answer = )
> Regards,
> Hamsters