|
Hi man,
In Ms Access, it can be achieved by
SELECT PCODE,PNAME FROM PRODUCT WHERE PNAME LIKE('*APPLE*')
Just replace '%' sign by '*' sign
Hope this helps
Niladri Biswas
|
|
|
|
|
I've developed this project that uses SQL Server CE. I've got my reference in and everything works fine for me. But when the user tries to install the program, she gets an error that says she's unable to load sqlceme35.dll.
So now I'm really confused. I could just include a reference to sqlceme but then when I send it to her again she'll probably get another error for another dll with my luck. I'm not sure what all files I need to include to make sure she can run this program. And I'm not sure where to look....help?
Denise "Hypermommy" Duggan
|
|
|
|
|
I had this same error here while migrating a windows CE system from VS 2003 to VS 2008.
There were a number of workarounds suggested on Google, none of which worked for me. I ended up re-writing quite a lot of code on the forms that were causing that error, however, I also installed the following on my Windows Mobile device.
sqlce.ppc.wce4.armv4.CAB
sqlce.repl.ppc.wce4.armv4.CAB
They can be found on your computer at this location: C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Devices\wce400\armv4
Whether it was the change in my code or the files I installed, I can't say (I was getting a massive set of random errors in the converted code, which went round in circles for quite some time, so can't remember off the top of my head if it was the code change or files installed that sorted out that specific error).
Good luck with it!
|
|
|
|
|
I found something on another board that answered this question for me. I hope I'm not breaking the rules, but I do wish to give credit where it's due. The link to what I found is http://www.eggheadcafe.com/conversation.aspx?messageid=31741425&threadid=31741420[^]
Basically, four files need to be included. These are:
System.Data.SqlServerCe.dll
sqlceme35.dll
sqlceqp35.dll
sqlcese35.dll
I had the first and 2nd, but not the other two. These just need to be included in the project, not installed or anything.
Whew!!!! At least that's that.
Denise "Hypermommy" Duggan
|
|
|
|
|
Forgot to mark previous as an answer.
Denise "Hypermommy" Duggan
|
|
|
|
|
I am using the free version of SQL 2008 that comes with Visual Studio. If i wanted my windows VB program to allow more than one user to add, edit, delete info is that possible? Are there limits to number of people accessing the database or limits on installing that on our server at work for 2-3 people to access?
|
|
|
|
|
|
|
If 'C' is constant or it is positional you can use substring to identify the following #n characters and isolate them into a variable. Then just include it in your insert.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi friends
Has anyone done a db for a multi-level compensation structure? I'm talking about a company that is MLM or a multi-level marketing network. Where distributors sign up under other distributors and the "downline" can go down many levels(but limited levels!). I need a sample MLM structure.Could anybody help me please.
Thank You
http://tutorialcode.blogspot.com/
|
|
|
|
|
wajans wrote: Has anyone done a db for a multi-level compensation structure?
Yes, lots of people
wajans wrote: I need a sample MLM structure
Think in terms of parent/child relationships, that should get you going in the right direction.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hello.
I am a total newbie to SQL Server, having worked extensively on MS Access and VB 6.0 only. But now i have upgraded to Visual studio 2008 and have slowly started to update myself on the new platform. I have SQL Server 2005 and I i know how to create tables and database files. But I don't have any clue whatsoever as to how to deploy/migrate the database that I have created as on a server whose address I can reference by its IP address.
Could someone help me or point me out to good articles or links to PDF's where I might find step by step instructions? By the way, my next project is a web application in ASP.Net.
Thanks and regards,
Kumar.
|
|
|
|
|
Backup and Restore is the best option. Back your db up, copy the file to the server and restore it from there. Job done.
In many places they use something like LiteSpeed or Red Gate's SqlBackup for this.
Regards,
Rob Philpott.
|
|
|
|
|
I'm new to sqlite and a novice at sql in general. I have a sqlite 3.1 database that I would like to edit. I have used several browsers/editors but seem to be running into a small problem.
It seems that the varchar fields are terminated by what I thing is a NULL,it looks like a small box with 00 00 inside, close to this but not quite ->.
Any select or update statement I run comes up blank because I can not reproduce that char.
Something Like:
UPDATE table SET field = 'text' WHERE field = 'text';
but with the correct termination on the field.
Thanks in advance for any help.
|
|
|
|
|
Sounds like you have some unicode in your data. You may want to try LIKE in your where clause but you are going to have to look into your data source and identify the crappy char and deal with it on the way in.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thats what I was thinking but I don't have any way to modify the data source. The LIKE will work to query data just fine but when I need to update the field, the source program will not read the data correctly. It seems to look for the terminator to separate each varchar field. If it is not there, the data from the next varchar field is mixed in with the first when displayed.
If I use a browser such as Sqliteman I can copy and paste the data just fine including the terminator but if I try it with an update statement it breaks down. Not going to update each line one at a time for 2000 fields lol.
If I use the SQlite manager plug-in for Firefox and copy/paste the update statement in sql as it should be, it drops everything after the terminator.
If I can use SQliteman to do a record at a time I would think there should be a way to include it in an UPDATE statement.
Thanks
|
|
|
|
|
You have a table with 2000 fields
I see some empirical testing coming your way.
Get the incriminating char into a variable using select & substring
loop through each record/field and do a replace on the variable value (you do not need to know it's value)
you still have a problem with crappy data getting into your DB!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi All,
I have a problem that when I going to create new package in SQL Server DTS package the enterprise window closed automatically, even when I open my previous package same problem is occurred.
I can not restore msdb database..
Please help me out
Thanks
Rajesh
|
|
|
|
|
I spent hours trying to get a Starter Kit from asp.net to install and run - well, most of two days anyway - and I finally got it to load in VS2008. I don't quite recall how; I tried everything I could find on the Internet, everything I knew 'should' work, and quite a few things that just seemed like they ought to work. I finally got it working, but I haven't a clue which combinations of bizarre workarounds finally did the trick.
Anyway, per the instructions on the help page I pressed ctrl-F5 to build and run the project, which was supposed to create the database in the default SQL Server 2005 server on this machine. There is a permissions error, in that user instances are not enabled. Searching for this led to the clue - run aspnet_regsql. It doesn't exist on my machine. Another, more specific clue was to run sp_configure 'user instances enabled' but there was no information about where to do that. SQL Server 2005 doesn't come with a GUI interface, or documentation. I found the download for the Management Console tool and installed it - works like a charm. Except that executing the stored procedure above returns 'command completed successfully', and displays the result that user instances are indeed enabled up to a limit of 1. The project still reports that user instances are not enabled, however, and will not run.
The package also included a set of queries to manually add the database, so I copied them into the management console Query window and executed them. Again, the result was a success, except that there is no database present.
What's the trick here? Or is this all just an elaborate scheme to finally push me over the edge?
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
I using access database for some application that i wrote in C# ( using ADO.NET). I update some values in my table - and i getting the information from the same table in same thread - ( i have only one thread in my application ) and i see that the values are not right and not update correctly.
How can i know if the data was update already ?
How to avoid this update delay ?
Is there some option to get some event ( some trap ) when the database table update done ??
|
|
|
|
|
Hi,
Running SQL server 2000 and working on a store procedure.
Basically, I need to get the tbPayRate id in order to insert into another table but having several payrate tables for different tasks and it means @table varies. But got an error that I must declare the variable '@table'. Does anyone know how to get round this issue?
DECLARE @table varchar(30)
SET @table='tbPayRate'
SELECT MAX(id) AS id FROM @table WHERE employee=5
Thanks,
Joe
|
|
|
|
|
unfortunately you can not use variables for table names in sql statement. The work around is as follows
declare @sql varchar(255)
decalre @table varchar(30)
set @table = 'tbPayRate'
set @sql = 'SELECT MAX(id) AS id FROM ' + @table + 'WHERE employee=5'
Now that you constructed your sql statement dynamically, you can execute it
Exec(@sql)
will do it
|
|
|
|
|
You must use a schema or database name to differentiate
the different table E.g schemaname.tbPayRate or Databasename.SchemaName.Tablename
you First declare a variable
and set the what u r select to the
value of the variable as shown below
Declare @tbPayRateID varchar(50)
set @tbPayRateID = (Select MAX(id) AS ID FROM schemaname.tbPayRate
Where Employee = 5
Try this out
|
|
|
|
|
Hi,
I am in Urgent need of query. I have 4 tables:
MeterSettings
MadeByID ConsumerTypeID AllocatedPowerID MeterID Date
1 2 3 22 5/11/2009
1 1 23
MeterMadeBy
ID Company TimeInterval
1 L&T 5
2 ABB 10
3 Rishab 15
ConsumerType
ID Type TimeInterval
1 SSI 5
2 MSI 20
3 LSI 30
PowerSanctioned
ID Power TimeInterval
1 5kw-10kw 5
2 10kw-15kw 10
3 15kw-20kw 20
4 25kw-30kw 25
now the requirement is I have to get MeterIds and corresponding Time Intervals in the following manner
if a Meter is having value for MadeByID in MeterSettings then we have to get TimeInterval of corresponding Meter.otherwise get the TimeInterval of
the meter based on value of ConsumerType. Otherwise go for PowerSanctioned.
I can't use Stored Procedures for this. The only option is query
|
|
|
|
|
Create a OUTER JOIN with all four answers and then use application logic to pick the correct one.
|
|
|
|