I received the following error on an application which I'm using Classic ASP as
the programming language, and Access Database (accdb)
ADODB.Parameter error '800a0d5d'
Application uses a value of the wrong type for the current operation.
I'm using memo as the data type in Access Database. The content which I'm trying to write into the database is retrieved from a Text Area, and contains HTML Scripts.
Here's the parameter:
objCommand.Parameters(1).value = content
Anyone has any suggestions on what I should do?
Use objCommand.Parameters(1) for to force convert to string
Related
Not able to decode Django session values which are being stored in django_session table.
session_data='.eJxVizsOwjAQBe_iGkX-bOw1JRUNFQew1vauEgGJRHCFuDsBpYDmFfNmnipRewypLXxPY1V75Yy1fQ-IRmsDOgZUu18pU7nw9DFvNE7d99jY0p3XPbZ8mitfD5v4Vw-0DGtaKhYkAijRaTQZvBQNHCvXaGxw4kkc5AxggwThKlgE2HuTiYNG9XoD3Gw7Mg:1llsLN:oAVvWg9xxXEmdaxYHzbJ3Ltv0UQ-i-NOt_KaHgUilhA'
I tried all the possibilities with base64 like base64.b64decode and getting binascii.Error: Incorrect padding error.
base64.b64decode(session_data)
I cant use Django inbuilt function like below in the image because I am outside of Django service
I need to get the dict data with decoding. Please help.
My task is the following, I need a way to store a query string value of s and pass it to the merchants Order Confirmation email.
consider the following,...mybigcommerce.com?s=fb.
Let's say that my client posts his website link to facebook and adds in a query string of s with a value of FB (facebook).
The desired result would be that on the initial load of the page, the query string would be saved as a cookie(or in Bigcommerce's case a global or store front variable)
Once I have it saved, I now know that you just simply append the variable to the email template.
example output:
email template source : %name_of_variable%.
My problem is, however, I don't see how to store the value into a variable.
Can I accomplish this without using the API, or for that matter can I do this using the API?
Thank you in advanced, I hope I have provided enough information.
Unfortunately, you cannot create your own variable in the email templates. The variables used here have been created and are supported by code within the core application. As such, it would require a core application change to extend existing functionality/add a variable. There isn't a way for you to write to an existing variable either.
I am trying to simply display .mdb database Using ASP.Net List View and AccessDataSource control but when i try to modify in Browser it generates the following error
[OleDbException (0x80040e10): No value given for one or more required parameters.]
I am building a Web application and I want to allow users to insert records into a database. The method that I came across is to take the information from text boxes and run this code:
SqlDataSource1.InsertParameters["ProductCode"].DefaultValue = txtProductCode.Text;
SqlDataSource1.InsertParameters["Name"].DefaultValue = txtName.Text;
SqlDataSource1.InsertParameters["Version"].DefaultValue = txtVersion.Text;
SqlDataSource1.InsertParameters["ReleaseDate"].DefaultValue = txtReleaseDate.Text;
try
{
SQLDataSource1.Insert();
}
...
If I try to inject some SQL I get the error message:
Message: String or binary data would be truncated. The statement has been terminated.
Does this method sanitise the parameters? I am having a hard time finding this information because I am not sure if there is still a way to get around this error. If it does not how should I go about sanitising the inputs?
Additionally, the ReleaseDate parameter seems to be currently reading as dd/MM/yyyy but is there a way to lock this so that the same code on a different system doesn't behave differently. I am worried that if the code is run on a system with different regional settings it will use a different format.
One of your field in the table is not long enough to insert the value. You need to check each of ProductionCode, name, Version and ReleaseDate for their length and increase them accordingly.
http://msdn.microsoft.com/en-us/library/aa196741(v=sql.80).aspx
ELMAH shows host, code, type, error, user, date and time by default on its error log web page. Is there any way to configure it and show other fields like IP or REFERER?
(source: googlecode.com)
You could write your own error page. Bind a datagrid to ErrorLog.GetErrors() and use whatever columns you want:
List<ErrorLogEntry> entries = new List<ErrorLogEntry>();
ErrorLog.GetDefault(HttpContext.Current).GetErrors(0, 50, entries);
string ip = entries[0].Error.ServerVariables["REMOTE_ADDR"];
string referrer = entries[0].Error.ServerVariables["HTTP_REFERER"];
ELMAH is open-source. You can download the source and make any modifications you like (within the terms of the license, of course.)
You should be able to trap any data made available by the HttpConext.Request object. You'd have to modify the code that grabs and stores the data, and the database to make columns for that new data.