|
That works.
It is a bit of a kludge, save file as PDF, send the PDF, erase the PDF file!
(Not elegant either, but as it works I shall leave it working now. Thanks for that!)
------------------------------------
"Password Protected? Your dealing with Geeks, just turn it on, type Gandalf and you're in!" - Frankie Boyle
|
|
|
|
|
looking for an alternative and efficient way to transfer table records from one database to another database.
could it be done with one sql?
ty in advance
maytel
|
|
|
|
|
If the databases are in the same server, and the database user account has access to both, you can easily copy data from one database to another:
insert into database2..someTable (oneField, anotherField)
select oneField, anotherField
from database1..SomeTable
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
ty for the prompt help
but could i ask for code sample?
insert into C:\database2...
select *
from c:\database1...
ty
|
|
|
|
|
What type of database? It looks like you may be talking access here?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
sorry yup im using access
|
|
|
|
|
maytel mynt wrote: using access
So use File-->Get External Data-->Import
to import the tables you want.
--------------------------------------------------------
Knowledge is knowing that the tomato is a fruit.
Wisdom is not putting it in fruit salad!!
|
|
|
|
|
The subject has asked it all.. but additionally, just wanna know how to simply use that component in windows app. Secondly how to add that component to toobox.
|
|
|
|
|
|
IIRC the latest release of code on CodePlex[^] is in VB2008.
Anyway - if you add the compiled dll to the references of a windows forms project the component should show up in the toolbox. If it doesn't try a "Rebuild All"...?
|
|
|
|
|
Hi,
i have listbox control which contains mutliple items and on checkbox checking multiple items are selected , now how i insert those selected items in data base using single insert statement .
please give me hint i google many times but didnot find any hint ,
regards
Rameez
|
|
|
|
|
rameez Raja wrote: how i insert those selected items in data base using single insert statement .
Any particular reason why you can't just loop through the collection of multiple items and insert them one at a time?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Thanks for reply,
Actullay iam working on reservation application and listbox contains name of vehicles i want to store all slected vehicles .
you are right kindly write few lines of code how i do that .
loop throuh each items in listbox ? and store one by one
Regards
Rameez
Thnks in advance
|
|
|
|
|
If you are qualified to write the application then surely you can write code to loop through the selected items in a list box.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I second that.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
rameez Raja wrote: kindly write few lines of code how i do that
No. Leaving it as a learning exercise for you to do.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
|
Thanks for every body's reply
i will do myself after reading such topic again thanks for advise and encouragement.
Regards
Rameez
|
|
|
|
|
I know this is simple for most of you guys but I'm not sure I even have the concept right, so here goes...
1. Read in a txt file that has 1 piece of data per line, I got that...
2. Count the number of items, I got that... :
3. store the count and the items in memory .. I think this is for an array
4. later I use the index to send the item through multiple query's in an SQL database ... got that hard coded right now and it works great
It is step 3 that I am stuck on conceptionally and technically.
Questions
1. Is an array the right thing to be doing here?
Any suggestions, thoughts or instructions would be greatly appreciated.
TIA
meh
|
|
|
|
|
Any reason for getting the number of items and storing it in an array?
For me, I would have skipped step 3. I will read the data per line and write it straight to the database once I read from the text file.
The only catch with this way is that if you encounter any errors in between you will not know the last position of data that you read from the file. But this can be prevented by using DB transaction during your database entry.
Cheers,
DePatrick
|
|
|
|
|
Like the other poster suggested, skip step 3. It is not really needed and is redundant.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I am guessing this is a study assignment, and you were asked to create an app according to these steps.
Under this assumption:
If you have managed step 4 then apparently you are also, perhaps unwittingly, already doing step three.
So the question is: how do you iterate through the items at the moment when running them through the queries?
The purpose of step 3 was probably to enable you to write a loop, for example using an array.
Something like:
<br />
For i As Integer To NumberOfItemsCount -1<br />
RunYourQuery(ForExampleAnArrayWithItems(i))<br />
Next<br />
So once again, as you have managed step 4 already, point 3 is moot, unless your teacher/professor meant for you to iterate though the items with a For loop.
If I assumed wrong about the assignment thing, ignore this and listen to the other guys.
Good luck,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Johan thanks for the reply.
I am iterateing through the db query's using the method you described. I have multiple files to read from and was wondering if a memory representation of each of the files would be a better approach?
Thanks again
meh
Statistics are like bikini's...
What the reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
That is a trickier question.
Theoretically speaking the amount of files could be enormous, and the amount of items in each file could be enormous, (EnormousFileAmount x EnormousItemAmount = HumongousDataQuantity) therefore it would not be advisable to first load all files into memory.
However, the scenario probably is something along the lines of electronic order files, which means that the app would never be handling more than a limited amount of files at any given run.
Connecting many times to a data source (your files) and doing a little work each time is generally speaking slower than making a single connection to a data source and doing a lot of work at once.
However...
Because you are accessing files, you need to make a separate connection to each separate file anyway, so that point is also really moot.
Which brings us to the advantage of many connections and little work each time: data integrity.
I.e. if a connection is interrupted for whatever reason, you loose very little work, and when you are using loops inside loops, there is much less danger of information getting mixed up.
P.S. pointer for extra credit: use System.IO.File.Move("FileLocation/FileName", "ArchiveFileLocation/FileName") , when handling multiple files.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi
I want to select various elements of and html document in a WebBrowser control but if web page has button element then I just dont get it selected.
And one more thing, how can I select specific javascript function within a webpage loaded in WebBrowser Control or get complete list of functions.
Can anyone help me please.
Regards,
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|