debasisdas 580 Posting Genius Featured Poster

After all these posts, I see you are using vb.net

If one goes through this thread, it is quiet clear that the OP has never said what exactly he has really done. But he always pretended to do a lot while he actually did nothing. Nicely he framed his questions and made our expert do all the coding. Once the code is delivered he comes back complaining that it is not working.

Now the expert realises all his assumption was wrong (OP has posted some code from some where)and the actual coding was to be done in .NET not in VB6.

May be the expert now will start writing code again in .net and supply. But i am sure that will again not work for OP. Because s/he never understood the code (never bothered to do that), it is clear from previous posts.

debasisdas 580 Posting Genius Featured Poster

@trilok31

Read line #6 of Jx_Man's code

debasisdas 580 Posting Genius Featured Poster

try this sample

select count(*) from demo where user_name = u_name and password = pwd

if this SQL returns 1 log in successful and proceed further
else
re-prompt for username / password.

No need of any looping or checking for EOF.

debasisdas 580 Posting Genius Featured Poster

Hi.
i detached the database and added it to my program as an existing item

What exactly you did ?

debasisdas 580 Posting Genius Featured Poster

I visited this thread several times in last couple of days, but never had the patience to read 600 + lines of code.

May be i will visit this again in the weekend.

debasisdas 580 Posting Genius Featured Poster

forget about PHP.

Post the SQL part of the code where you have any issue.

debasisdas 580 Posting Genius Featured Poster

you are sure , not passing string value of more the length than permitted

ex--

string of length 12 where the column size is 10

debasisdas 580 Posting Genius Featured Poster

you need to check if the MDB is in sync with the earlier version of database.

and ensure that you are passing proper data to the DB from application.

debasisdas 580 Posting Genius Featured Poster

this is the code you have ?


but i can't see any code

debasisdas 580 Posting Genius Featured Poster

try this

dim my_string as string

my_string = "your string goes here..."

if my_string = StrReverse(my_string) then
MsgBox ("This is palindrome!")
end if
debasisdas 580 Posting Genius Featured Poster

If your problem is solved please mark this thread as solved.

debasisdas 580 Posting Genius Featured Poster

Yes.

You can add a filed contact_type and store values like 1,2,3...
1--contact is doctors
2--contact is a nurse
3--contact is a pharmacist.....

etc

debasisdas 580 Posting Genius Featured Poster

if you are moving form one text box to the other in a sequential order you need to code in the lost_focus event of the textbox.

debasisdas 580 Posting Genius Featured Poster

how you ensure that user does not skip input to any of the 6 text boxes ?

debasisdas 580 Posting Genius Featured Poster

why not add a command button to the form and add the code in command button click event

debasisdas 580 Posting Genius Featured Poster

why not merge both address and contact, and add a flag to define the contact type .

debasisdas 580 Posting Genius Featured Poster

1. find the position of the word that you are looking for.
2. find the position of the previous and next new line character.
3. delete / remove everything in between.

4. go to step 1

debasisdas 580 Posting Genius Featured Poster

kindly post the code that you are working on.

debasisdas 580 Posting Genius Featured Poster

How you determine CONTACT and ADDRESS belongs to whom ?

Don't you think both should be merged into a single one.

debasisdas 580 Posting Genius Featured Poster

The statistics is very common for newbie posters.

As you keep contributing usefully to the community, you will keep moving up the ladder.

debasisdas 580 Posting Genius Featured Poster

try this

SELECT posts.*, channels.channel 
FROM posts 
INNER JOIN channels 
ON posts.channel_id = channels.id 
WHERE  (posts.id=? OR posts.id=? )   ----better to use IN clause here.
ORDER BY posts.published DESC
debasisdas 580 Posting Genius Featured Poster

yes , that is exactly how developers trouble shoot. :)

debasisdas 580 Posting Genius Featured Poster

Why not create insert script using some tool (best in EXCEL) and insert the parent record and then the dependent child record.

debasisdas 580 Posting Genius Featured Poster

What is the problem , i don't see anything wrong with the SQL.

debasisdas 580 Posting Genius Featured Poster

Yes, it has to be done through SQL queries by placing some extra controls like a pair of combobox and textboxes on the form.

AndreRet commented: Agreed. +7
debasisdas 580 Posting Genius Featured Poster

so what is the problem ?

are you facing any issue with the code ?

debasisdas 580 Posting Genius Featured Poster

show some effort ans show the code that you are working on.

debasisdas 580 Posting Genius Featured Poster

you need to insert a page break after each record.

debasisdas 580 Posting Genius Featured Poster

@Dani:
great job.

I can only imagine how fast you cooked it. :D

debasisdas 580 Posting Genius Featured Poster

You need to read this and this.

debasisdas 580 Posting Genius Featured Poster

As i have already suggested, yuou may need to use some third party control.

debasisdas 580 Posting Genius Featured Poster

In form laod

Combo1.AddItem rs("itemcode")
Combo1.Itemdata(Combo1.NewIndex) = rs("description")

on combo_click

text1.text = combo1.itemdata(combo1.ListIndex)
debasisdas 580 Posting Genius Featured Poster

is that code not working for you ?

debasisdas 580 Posting Genius Featured Poster

alternate method:

Use the item data property of the Combo Box.

populate the combo like this

Combo1.AddItem rs("itemcode")
Combo1.Itemdata(Combo1.NewIndex) = rs("description")

and display the Itemdata property in the textbox.

debasisdas 580 Posting Genius Featured Poster

No, not in any grid directly as is as in Excel sheet.

debasisdas 580 Posting Genius Featured Poster

I did n't mean to use horizontal scroll bar for actual display, just to set the value..

It is always better to design your own component for the purpose.

debasisdas 580 Posting Genius Featured Poster

What about using the Horizontal scroll bar .

debasisdas 580 Posting Genius Featured Poster

If you go through the very 1st post of this thread you will understand what code we are discussing here .

Here the code under discussion is Purely VB 6.0 only.

We are not going to .net and not trying to make that backward compatible.

debasisdas 580 Posting Genius Featured Poster

But how you set the value of the boolean variables ?

debasisdas 580 Posting Genius Featured Poster

Remove rs.Update from move methods.

that needs to be handled separately.

debasisdas 580 Posting Genius Featured Poster

This is VB 6.0 code ?

debasisdas 580 Posting Genius Featured Poster

Why can't you understand that since you are opening the same record set again and again on each click event of next and previous button you are always at the same record.

What you need to do is call the move methods of the recordset object that you have opened in the form load event.

debasisdas 580 Posting Genius Featured Poster

when you select the combo
pass the code into another SQL and fetch the description and display in textbox.

debasisdas 580 Posting Genius Featured Poster

value member and display member are not available in vb 6.

debasisdas 580 Posting Genius Featured Poster

follow these steps.

1. populate the combo only (not the text box) from the recordset.

2. to populate the text --capture the value from combo and pass the same back to DB using SQL. Fetch the Description and display in a textbox.

debasisdas 580 Posting Genius Featured Poster

You need to write a recursive function to find and delete all the files of specific format.

Kindly post the code that you are working on currently.

debasisdas 580 Posting Genius Featured Poster

what about implement the filter at DB level through SQL by generating and executing queries dynamically at run time.

debasisdas 580 Posting Genius Featured Poster

may be i will read this LONG question in weekends.

debasisdas 580 Posting Genius Featured Poster

Is your data getting updated into the DB before yo invoke the report ?

Do you refresh the recordset once the data is updaetd in the DB ?

and finally what is database 2010 ? Is it MS Access 2010 ?

debasisdas 580 Posting Genius Featured Poster

Report , what report ?
Where you enter data ?
Is that connected to database ?
What database ?
How the report gets populated ?

?
??
???