問題タブ [executequery]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
1531 参照

c# - Can DataContext.ExecuteQuery process the whole where statement

I'm trying to fix a problem in an ASP.NET application which uses DataContext.ExecuteQuery to execute sql statement. The query has this part:

#xA;

where "whereClauses" is a List of strings. This way, a search functionality is implemented into the query. Problem appears when an open search is run for a string like "O'Donnel" which obviously run query into an error. I have been asked to fix this problem. My approach was to substitute the where statement with "{0}" in the query and then pass it as a parameter in ExecuteQuery method. What I achieved is:

#xA;

but it doesn't work? When I substitute the whole where part with just a parameter for it everything is fine:

#xA;

My question - is it then possible to inject the whole where statement dynamically into DataContext.ExecuteQuery method, or can I pass specific parameters only using this method?

0 投票する
1 に答える
677 参照

c# - mssqlサーバーで特定のクエリを定期的に実行する

サーバーで定期的にクエリを実行する必要があります。クエリは、データベース内のテーブルから特定の日付を選択し、現在の日付で確認し、現在の日付がそれよりも高い場合は、別のテーブルに値を挿入するなどの特定のタスクを実行します。現在の日付が選択した日付の値より前の場合は、何もしません。これはどのように達成できますか?トリガーを使用するか、cron ジョブを使用してこれを行う方法はありますか。私のサーバーは Microsoft SQL Server 2012 (SP1) - 11.0.3393.0 (X64) です。C#.net で Android アプリケーションのサーバー側コードを作成しました。C#.net と SQL クエリの世界は初めてです。誰かがこの件で私を助けてくれませんか。

0 投票する
1 に答える
717 参照

sqlite - Xamarin PCL と sqlite.net

pcl Xamarin では、クエリを実行するために使用される型を関数に渡す必要があります。私が使用しようとしたコードは次のとおりです。

しかし、うまくいきません。次のエラーが表示されます。

そのようなことが可能かどうか誰にもわかりませんか?

どうもありがとうございました

0 投票する
1 に答える
73 参照

php - PHP でスローされる PDOException

以下の関数を実行しようとすると、「SQLSTATE[HY093]: 無効なパラメーター番号: バインドされた変数の数がトークンの数と一致しません」というエラーが表示されます。

$POST[$awc] 変数は、このページhttp://ladd-dev.bitstormweb.com/products/interactive-product-finder/のチェックボックスで埋められます。各チェックボックス グループ (たとえば、1 つのシリーズと 1 つのマテリアル) の 1 つを選択すると、結果は問題ありませんが、同じグループで複数のボックスを選択すると、PDOException が発生します。

誰かが理由を知っていますか?私はまだこのコードを学んでいるので、助けていただければ幸いです!