Runtime error insert in the data source, please help
Hello;I do an application small security for a newspaper in function. I have everything works, but when I try to post to the DB and leave a field empty, it generates an error. I am placing my request code and then the 2 errors I get:
Query:
< cfquery datasource = "#APPLICATION.dataSource #" >
INSERT INTO Bliplist
(rejection, HTTP_USER_AGENT)
VALUES
(< cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.rejip #" >,)
< cfqueryparam cfsqltype = "cf_sql_longvarchar" value = "#form.browser #">) "
< / cfquery >
< cflocation url = "blist.cfm" >
Error:
Run database query error.
[Macromedia] [SequeLink JDBC Driver] [ODBC Socket] [Microsoft] [ODBC Microsoft Access driver] Field 'Bliplist.HTTP_USER_AGENT' cannot be a string of length zero.
The error occurred in C:\Websites\4npp8b\admin\trac\bl-action.cfm: line 28
26: (< cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.rejip #" >,)
27: <!-< cfif HTTP_USER_AGENT is true - > >
28: cfqueryparam cfsqltype = "cf_sql_longvarchar" value = "#form.browser #">) "
29: <!-< / cfif >->
30: < / cfquery >
--------------------------------------------------------------------------------
SQLSTATE HY000
SQL INSERT INTO Bliplist (rejection, HTTP_USER_AGENT) VALUES ((param 1), (param 2))
VENDORERRORCODE-3702
So I added the code to check if the field was true, and I get this error: (here's the cfif and error):
< cfif HTTP_USER_AGENT is true >
< cfqueryparam cfsqltype = "cf_sql_longvarchar" value = "#form.browser #">) "
< / cfif >
Error message:
Run database query error.
[Macromedia] [SequeLink JDBC Driver] [ODBC Socket] [Microsoft] [ODBC Microsoft Access driver] Syntax error in INSERT INTO statement.
The error occurred in C:\Websites\4npp8b\admin\trac\bl-action.cfm: line 28
26: (< cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.rejip #" >,)
27: < cfif HTTP_USER_AGENT is true >
28: cfqueryparam cfsqltype = "cf_sql_longvarchar" value = "#form.browser #">) "
29: < / cfif >
30: < / cfquery >
--------------------------------------------------------------------------------
SQLSTATE 42000
SQL INSERT INTO Bliplist (rejection, HTTP_USER_AGENT) VALUES ((param 1),)
VENDORERRORCODE-3502
What I am doing wrong and how to fix it? I have also a query on this update and that throws the same error is there, it's a blank form field, kind of lost here. How to allow length 0?
Thank you.
CFmonger
jdeline wrote:
This may not work. He has a little known gotcha with CGI variables.
> Under certain circumstances, HTTP_USER_AGENT will not exist. What you want to do is
IIRC do to their fickle nature, ColdFusion will always return true for
a test of IsDefined() for any value.
Tags: ColdFusion
Similar Questions
-
ERROR: Cannot open the data source for the user
Hello, I followed the instructions in the URL below
http://gavinsoorma.com/2010/02/GoldenGate-installation-Oracle-11g-on-Red-Hat-Linux/
and I get the ERROR: cannot open the data source for the user
I run the sql for the role but nothing
any ideas please.
Sun solaris operating system
database version 9.2.0.7Previous question that you were:
Where did you get the GoldenGate for Oracle 9i software? -
In my development environment, when I run the production server, I get the following error in the server.log. I have configured the data source for the production. I use ATG 10.1. Please help solve this problem. Here are the logs
22:46:45, 765 full repository INFO [ProfileAdapterRepository] SQL boot
22:46:45, 988 full repository INFO [AdminSqlRepository] SQL boot
22:46:45, 990 Initializing INFO [AdminAccountInitializer] account database/atg/dynamo/security/AdminAccountManager of/atg/dynamo/security/SimpleXmlUserAuthority
22:46:46, 450 ERROR [ProfileAdapterRepository] Table 'dbc_user' in the descriptor of the item: 'user' does not exist in a space of accessible table by the data source. DatabaseMetaData.getColumns returns without columns. Catalog = null Schema = null
22:46:46, 466 WARN [ProfileAdapterRepository] atg.adapter.gsa.GSARepository-> loadColumnInfo: SQLException in Table.loadColumnInfo. Try again.
com MySQL.JDBC.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'atgcoredb.dbc_user' does not exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
at com.mysql.jdbc.Util.getInstance(Util.java:382)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3603)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3535)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1989)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2150)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2570)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1476)
to com.mysql.jdbc.DatabaseMetaData$ 7.forEach(DatabaseMetaData.java:3966)
at com.mysql.jdbc.IterateBlock.doForAll(IterateBlock.java:51)
at com.mysql.jdbc.DatabaseMetaData.getPrimaryKeys(DatabaseMetaData.java:3950)
at atg.adapter.gsa.Table.loadColumnInfo(Table.java:1926)
at atg.adapter.gsa.GSARepository.loadColumnInfos(GSARepository.java:7534)
to atg.adapter.gsa.GSARepository$ 1.run(GSARepository.java:5431)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
to java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
22:46:46, 467 WARN [ProfileAdapterRepository] unknown JDBC type for property: businessAddress, element type: user. Make sure that the column names in the database and match model. The business_addr column is not found in the set of columns returned by the database: {} for this table.
22:46:46, 470 ERROR [ProfileAdapterRepository] Table 'dbc_buyer_billing' in the descriptor of the item: 'user' does not exist in a space of accessible table by the data source. DatabaseMetaData.getColumns returns without columns. Catalog = null Schema = null
22:46:46, 470 WARN [ProfileAdapterRepository] atg.adapter.gsa.GSARepository-> loadColumnInfo: SQLException in Table.loadColumnInfo. Try again.
com MySQL.JDBC.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'atgcoredb.dbc_buyer_billing' does not exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
at com.mysql.jdbc.Util.getInstance(Util.java:382)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3603)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3535)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1989)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2150)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2570)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1476)
to com.mysql.jdbc.DatabaseMetaData$ 7.forEach(DatabaseMetaData.java:3966)
at com.mysql.jdbc.IterateBlock.doForAll(IterateBlock.java:51)
at com.mysql.jdbc.DatabaseMetaData.getPrimaryKeys(DatabaseMetaData.java:3950)
at atg.adapter.gsa.Table.loadColumnInfo(Table.java:1926)
at atg.adapter.gsa.GSARepository.loadColumnInfos(GSARepository.java:7534)
to atg.adapter.gsa.GSARepository$ 1.run(GSARepository.java:5431)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
to java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
22:46:46, 471 WARN [ProfileAdapterRepository] unknown JDBC type for the property: myBillingAddrs, element type: user. Make sure that the column names in the database and match model. The addr_id column is not found in the set of columns returned by the database: {} for this table.
22:46:46, ERROR 611 [ProfileAdapterRepository] Table 'dbc_org_billing' in the descriptor of the item: "organization" does not exist in a space of accessible table by the data source. DatabaseMetaData.getColumns returns without columns. Catalog = null Schema = null
22:46:46, 611 WARN [ProfileAdapterRepository] atg.adapter.gsa.GSARepository-> loadColumnInfo: SQLException in Table.loadColumnInfo. Try again.
com MySQL.JDBC.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'atgcoredb.dbc_org_billing' does not exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
at com.mysql.jdbc.Util.getInstance(Util.java:382)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3603)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3535)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1989)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2150)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2570)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1476)
to com.mysql.jdbc.DatabaseMetaData$ 7.forEach(DatabaseMetaData.java:3966)
at com.mysql.jdbc.IterateBlock.doForAll(IterateBlock.java:51)
at com.mysql.jdbc.DatabaseMetaData.getPrimaryKeys(DatabaseMetaData.java:3950)
at atg.adapter.gsa.Table.loadColumnInfo(Table.java:1926)
at atg.adapter.gsa.GSARepository.loadColumnInfos(GSARepository.java:7534)
to atg.adapter.gsa.GSARepository$ 1.run(GSARepository.java:5431)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
to java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
22:46:46, 612 WARN [ProfileAdapterRepository] unknown JDBC type for the property: myBillingAddrs, element type: Organization. Make sure that the column names in the database and match model. The addr_id column is not found in the set of columns returned by the database: {} for this table.
You want to run the B2BCommerce module? If so, then you must run the $dynamo_home /... / B2BCommerce/SQL/db_components/MySQL/b2b_user_ddl. SQL ddl because you are missing the B2BCommerce tables. If this isn't the case, you will have to redo without the B2BCommerce module.
Thank you
Joe
-
Cannot create the data source in console (Linux) wls XE db (windows)
Hi all
I use Linux5 for 11.1.1.1.4 soa deployments, I'm unable to create the data source in WLS of XE database that runs in win7, I'm getting below error.
did I do it properly or it is not possible? When connecting with db XE which runs on Linux, I am able to connect.
-Error connection failed test.
-Error IO error: the network adapter could not establish the connection
oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:443)
oracle.jdbc.driver.PhysicalConnection. < init > (PhysicalConnection.java:670)
oracle.jdbc.driver.T4CConnection. < init > (T4CConnection.java:230)
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:567)
oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:404)
oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXADataSource.java:694)
oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:267)
oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:134)
com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:745)
com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:458)
sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)
org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
...
just please give me some resolution.
Concerning
ShankarI noticed that this is a problem with b & w of the VM communication. box of VM workstation vm.
Thankx
Siva -
Connection to the data source in ColdFusion 8 vs FC 6
Hi all
I have a CF6 app that works well. However, I am in the process of upgrading to CF8, and code no longer works. I went through the documentation and found no information about the replacement code.
My old code gets a data source, acquires a database connection, using the connection and then close the data source.
variables.dsService is a CreateObject ("java", "coldfusion.server.ServiceFactory"). DataSourceService;
variables.dsManager = dsService.getDman ();
variables.dataSource = variables.dsManager.getDataSource (< data source name goes here >);
variables.dbConnection = variables.dataSource.getConnection ();
< insert here the code to use the db connection >
variables.dbConnection.close ();
Under CF8, the error message is "the getDman method not found." So, I've been unable to find any code that will allow me to have access to an object that implements DataSource, so that I can use my connections.
Any advice would be appreciated.
Mike K.In the end, I discovered that what I had was pretty simple
variables.dsService is a CreateObject ("java", "coldfusion.server.ServiceFactory"). DataSourceService;
variables.dataSource = variables.dsService.getDataSource ();
variables.dbConnection = variables.dataSource.getConnection ();
-
search form Web apps: how to retrieve the value of the data-source type field
Hello
My question is:
How can I retrieve the value of the source field of a web - app data-types when you insert the "form web search apps" on a web page.
I have a web application that contains fields from the data source of the type. These fields to recover the (data) value of the 'web app' - 'elements of the field' field of another web application.
When I insert the form
Web apps
Web apps-search form
Name of the Web application
It displays the fields with the field (ie. string, number) types other than type of field 'data source '.
(Note: in the mode 'model of list' module of data tags, the fields of the data source are visible).
What other (alternative) possibilities are there to create a search form?
Thanks for your help.
Kind regards
Carla
By chance, I came up with this workaround. Of course there are other methods to get your data from a web - app, but if you want to use the 'Web apps search form', it would be a workaround.
I noticed that the "Web apps entry form" contains all the fields of web applications for your web application (including the fields of the data source).
It is possible to add the fields to the form of the "Web apps entry form" in the «Web apps search form»
If you insert the "Web apps entry form" on a blank page, you will see all the fields in your web App including the "data source fields. The names of form fields contain something like.
-
OBIEE Mapviewer 11.1.1.7.1 cannot change the data source
Hi all
I am trying to configure mapviewer on our environment and after
by clicking on configuration
Add the DB details
Save & Restart is updated the file xml but not displayed on the data source tab.
But where as the other details of DB, I am able to add without problem, then if I click on change by selecting the data source to add/edit the details required to DB I get following error.
Source of data editing is not yet supported. However, you can delete and re-create it with the new settings.
and on the Management tab is not showing me any option to add the new source of data manually.
someone has encountered this problem before. TIA
Maybe the connection details are wrong, you see something in the Map Viewer logs files?
under FMW_HOME/Oracle_BI1/bifoundation/jee/mapviewer.ear/web.war/WEB-INF/log/mapviewer.log
-
I was able to connect my 10 coldfusion administrator mysql database, using the mysql(4/5) driver. However when I try to perform a query in a Web page, I get an error saying page:
The data source is not found
Here is the code snippet:
< cfquery name = "dump" datasource = "newsletter" username = "root" password = "*" > (my password is correct)
Select *.
newsletter of
< / cfquery >
< cfdump var = #dump # >
Any help would be appreciated.
I realized that it was.
I had installed Coldfusion 9 times and 10 of Coldfusion. It seems that I was getting the database connected with Coldfusion 9, but then I was building and running on the server, coldfusion 10. Uninstalling coldfusion 9 and ensuring that the data source has been connected to the coldfusion administrator 10 solved the problem.
-
Failed to remove application and the data source of AppWizard
Hello
I use hyperion planning 11.1.2. I can't uninstall the application and data source in the list AppWizard (tablespace and a user of the oracle database are deleted). When I try to delete the data source, I can not because it is associated with the application. And when I try to uninstall the application, I get an error: unable to remove application information, see in the newspapers.
Thanks for any help.
Edited by: user13106562 the 18.10.2010 23:32>
I can't uninstall the application and data source in the list AppWizard (tablespace and a user of the oracle database are deleted).You say you deleted the user and the tablespace before removing the application.
If so you probably have to manually remove the application, an example is available here:- cannot remove the application planning 9.3See you soon
John
http://John-Goodwin.blogspot.com/ -
ADF 11 g / how to set the data source
Hi all
I'm trying to deploy the my application on weblogic server.
deployment was successful but the following error has occurred so that the home page opened, "password is zero".
I already have a password will be saved and deploy, but it seems that password is not deploy.
So I create a data source on weblogic.
but I have found that the way to set the data source in the model of the adf.
(Production version of 11g Jdeveloper + Adf)
Thank you.
Mucahid behavedDo you use a jdbc url or a jdbc data source?
Model project in you right click on the module of the application and select configuration. Change the configuration to use a jdbc data source.Timo
-
In access to AOL e-mail via the full version, I can navigate my account (old messages, new messages, spam, etc.) very well, but when I try to open an individual email, I get this error message: "there was an error while loading the message. Please try again later. »
This is identical to a problem someone else was described in another thread... Unfortunately, nothing suggested you him seemed to work. I have BEEN cheated at the opening of a file attached to an e-mail immediately before this started, so I think it's a virus or something. IN ANY CASE... I AM able to open the messages when I use the basic version of AOL. Initially, the problem seemed to be in Firefox, but I tried with Internet Explorer now also and it's the same thing, and the basic version is accessible while the full version is still blocked.
On both browsers, after the error message, I can't even click on individual posts to TRY to open another, and there are a few not-very-right boxes and the x and the things that appear on the screen that do not belong.
Please tell me that you can not do that, go away... I tried uninstalling and reinstalling... Firefox who did not. I also enjoy McAffee, and that has not changed anything.
You can do a check of malware with several digitization programs of malicious software on the Windows computer.
Please scan with all programs, because each program detects a different malicious program.
All of these programs have free versions.Make sure that you update each program to get the latest version of their databases before scanning.
- Malwarebytes' Anti-Malware:
http://www.Malwarebytes.org/MBAM.php - AdwCleaner:
http://www.bleepingcomputer.com/download/adwcleaner/
http://www.Softpedia.com/get/antivirus/removal-tools/AdwCleaner.shtml - SuperAntispyware:
http://www.SUPERAntiSpyware.com/ - Microsoft security scanner:
http://www.Microsoft.com/security/scanner/en-us/default.aspx - Windows Defender:
http://Windows.Microsoft.com/en-us/Windows/using-Defender - Spybot Search & Destroy:
http://www.safer-networking.org/en/index.html - Kasperky free Security Scan:
http://www.Kaspersky.com/security-scan
Alternatively, you can write a check for an infection rootkit TDSSKiller.
- Utility anti-rootkit TDSSKiller:
http://support.Kaspersky.com/5350?El=88446
See also:
- "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked
- Malwarebytes' Anti-Malware:
-
How to bind the data source to a custom class?
Hi all.
I use the chart control to draw two types of plots. One is a path of spectrum which refreshes all samples in a short time, and the other is a curve of time series which add than one sample of each time. A chartcollection was related to the data source, however, and draw the spectrum seems to not cool off very quickly. Was it due to the propertychanged event? In order to improve the speed of response, what should I do to deal with the data source?
I went through your response and the help files and found I made a stupid mistake - I always used to Append method (double, double) and did not notice its format void Append (list
, list ). Thanks for your patient response, Paul :-)
-
I have the error code: 80072f8f on my lap, please help
I have the error code: 80072f8f on my lap, please help
Please see this thread
UTC/GMT is 08:08 Tuesday, November 1, 2011
-
I bought a latitude d530 use. It came with Windows 7. Site Web of Dell initially said vista wit came. It is no longer start. Error says check the data cable. Sometimes, reinstall drive. I do not have the windows CD. Can I download the original Windows on android phone and the transfer
You can download and create a bootable copy:
then
-
I get an error of installation: Error 1612. The installation source for this product is not available. Verify that the source exists and that you can access. What is the solution?
Hello
This link might help: How do resolve error messages that occur when updating Adobe Acrobat or Reader for Windows
Kind regards
Sheena
Maybe you are looking for
-
No neighbors listed on gift request screens and can not enter one
Pop - up screen in farmville to send gifts to neighbors. In version 3, it works by listing all the names of neighbor and you can select or add a few. 4 no names are listed and I can't enter all names. More when I select the skip option, it does not c
-
Question of chipset G35 IPIBL-LB
I have a question that drives me crazy, is my card mother sli compatible, because I was looking for more graphic power, but I don't know if it is or is not
-
Thunderbolt unrecognized Gigabit adapter
Hi all My adapter is not recognized. Network, I get the message 'None of the Member interfaces is connected' and advanced tells me my Thunderbolt1 and Thunderbolt2 are inactive. But the system report fact say device naming with its serial number and
-
iMac 21.5 "2010 running El capitan refuses to install silverlight
I have an iMac 21.5 "2010 el capitan running, I tried to uninstall it reboot and install silverlight again and nothing it doesn't. It is said he has successfully installed and when you return to netflix or amazon says that you must install it. Thank
-
username: bottomtime - e-mail: * address email is removed from the privacy *