473,411 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

oledbcommand

where alltrim(cocode) = ?
..Parameters.Add(New OleDbParameter("@oacode", OleDbType.VarChar, 10)).Value
= strName
When the strName is blank, (it return all the record)
How can I correct it ??
I am using vfpoledb.dll
Sep 26 '06 #1
1 1396
2 ways
1. do a check in stored proc or query to return nothing
when empty or null
2. send "-1" or some const value whenever it is empty from the bo layer
itself.
--
Y2KPRABU, MCP, INDIA
WEB APPS
"Agnes" wrote:
where alltrim(cocode) = ?
..Parameters.Add(New OleDbParameter("@oacode", OleDbType.VarChar, 10)).Value
= strName
When the strName is blank, (it return all the record)
How can I correct it ??
I am using vfpoledb.dll
Sep 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eitan | last post by:
Hello, I need sample code for using oleDBCommand in ASP (not dotnet), please. Thanks :)
1
by: Jason Steeves | last post by:
-Dim cmd As OleDbCommand -cmd = New OleDbCommand("select * from qmsstats where firstname='jason'", OleDbConnection1) -OleDbDataAdapter2.SelectCommand = cmd -DataGrid1.Visible = True...
0
by: jerim | last post by:
Hi I have the following Problem: I have an Access DB. Tablename: Formate; TableColoumns: ID (=Numeric) Name (=string)
2
by: Christopher | last post by:
Could Anyone help me! I'm currenly working on an application which involves SQL Statements. And my current problem is that when i execute the SQL statement on MS Access 2003 the Insert Statement...
1
by: Brian | last post by:
Was browsing around online for code to connect to a database usign ADO and C#... and i found this very simple but useful reference (http://www.c-sharpcorner.com/database/db_list.asp) However,...
2
by: Adam | last post by:
Hey guys I’m pretty new to this parameterized commands thing and I don’t know why this code isn’t working. I have a Connection object set up as Conn, and a Rec object which is holding my values....
0
by: Tom Wild | last post by:
Hi I am creating a webform in VB.Net which connects to an Access database. I can get the webform to connect to the database fine and also to download data but when I try and update the...
0
by: RG | last post by:
OleDbCommand.Prepare error: Size of parameter (VB.NET 2003) I need to do a SQL INSERT statement into an Access table, and I’d like to use the exact technique described in the Help file example...
4
by: Agnes | last post by:
Dim authConnection As New OleDbConnection("Provider = VfpOleDB.1;Data Source = d:\cgl\vfpmaster\ttsdata\tts.dbc") authConnection.Open() Dim authCommand As String = "select loginid from coinfo...
0
by: =?UTF-8?B?R8O2cmFuIEFuZGVyc3Nvbg==?= | last post by:
sippyuconn wrote: The purpose of reusing a command is to set it up with parameters and everything and then call the Prepare method. Then each time you use the command you just assign values to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.