Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Sql Error

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-11-2010, 01:12 PM
aru aru is offline
Junior Member
 
Join Date: Feb 2010
Posts: 24
Default Sql Error

hi

This is My Code

Reader.New1
Command.AddParameter("SEARCH")
Command.SetParameter("SEARCH","%" & TextBox1.Text & "%")


str = "SELECT * FROM info WHERE name LIKE @SEARCH"


Command.CommandText = str
Connection.BeginTransaction
Reader.Value = Command.ExecuteReader

Do While Reader.ReadNextRow = True
Table1.AddRow (Reader.GetValue(0))

Loop
Reader.Close
when iam click the Search Button The Table is Show Button. Then I again Clicked The Search Button

There is a Error Like This
Please See The Attachment
Attached Images
File Type: gif untitled.GIF (9.2 KB, 8 views)
Reply With Quote
  #2 (permalink)  
Old 03-11-2010, 02:56 PM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 810
Awards Showcase
Beta Tester 
Total Awards: 1
Default

So according to the error text the error is happening on the AddRow() and is not an SQL error.

Are you certain that no two SQL rows have the same ("arun") value?

How about removing the uniqueness requirement of the "Name" field in the table and seeing what table rows get created then?

Mike.
Reply With Quote
  #3 (permalink)  
Old 03-12-2010, 09:42 AM
Merlot2309's Avatar
Basic4ppc Veteran
 
Join Date: Feb 2009
Location: Spain
Posts: 293
Default

Hello,

I had more or less the same problem and found a solution in the German forum:

Add a Sub with the code to add columns and call this Sub in the App_start.

Hope this helps.

Regards,
Helen.
__________________
IPhone 4 - HTC Legend - HTC Touch Diamond 2
Android 2.2 Tablet 10.2" (Chinese Superpad 3)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


All times are GMT. The time now is 08:44 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0