|
AOA
I dont think Adding Column Id will speed up, instead check ur connectivity method or use DSN etc to speed up or simply import ur data to backend database by external means for once and all
thnx
Faisal iqbal Ch
|
|
|
|
|
Excel isn't exactly a database. The Jet database doesn't have a NewId() function like SQL Server T-SQL does.
You'll have to generate GUID's using your own code and populate that column yourself. You'll also have to verify that the GUID your code generates does not already exist anywhere in your data too.
Aftab Sindhi wrote: I don't want to loop through each row to add the value because records can be between 20,000 to more than 100,000.
Where you put the code is dictated by your process. If you already have a large table, but are just missing the GUIDs, you'll have to go through and add the values yourself, enumerating the entire table.
Aftab Sindhi wrote: I expect quick response.
You can "expect" all you want. We all do this on a volunteer basis and do not get paid at all. We'll get to answering your question in our own time, whenever we can.
|
|
|
|
|
Thanks Dave Kreskowiak and fazeepk for your quick response.
I am adding ID (GUID) column for internal purpose, which is must for my program. I am adding through the loop, which i wanted to eliminate, thats why i asked if there is auto generating way available. Thats what I mean to speed up.
Dear Dave Kreskowiak, I know Excel is not database and has no NEWID() function. Purpose to ask the question was, may be I've not enough knowledge about Excel. May be there is any other function/way available. But from your reply I can guess that I've no any option other than LOOP.
I think DataTable is not related to any database. Its pure .NET object. Why its not firing events, when it is populated by any means(i.e. FILLed by DataAdapter).
Well, thanks again to both of you. I'll just wait little, if there will be any other reply with solution.
Regards
Aftab Sindhi
.NET Application Developer
|
|
|
|
|
Aftab Sindhi wrote: I know Excel is not database and has no NEWID() function. Purpose to ask the question was, may be I've not enough knowledge about Excel.
It has nothing to do with Excel. There is no function in the Jet database engine that generates Guids. Jet is where the SQL expression is going to be parsed and executed. Excel is just used as datastore.
Aftab Sindhi wrote: May be there is any other function/way available
I already said the only way you've got is the one you're already using.
Aftab Sindhi wrote: I think DataTable is not related to any database.
No, it's not. It's an in-memory copy of the data and metadata retrieved from a database, or some other datastore.
Aftab Sindhi wrote: Why its not firing events, when it is populated by any means(i.e. FILLed by DataAdapter).
Probably because the events have to be wired up manually. You create a new instance of a DataTable, then you use AddHandler to wire up the events.
Also, when filling a DataTable with a DataAdapter, the events will not fire because the rows are not being added to the DataTable using the methods exposed by the DT. If they did, there would be a massive number of events firing, nearly all at once, while the table was being filled.
|
|
|
|
|
I have report with a list,,, in List I drag data from datasource,,, but I'am false drag data,,
how delete data source name of order "datasetname in properties list"
please help me..
|
|
|
|
|
um...what?
|
|
|
|
|
Yeah, I can't understand your question either.
|
|
|
|
|
=D I have problem more important to me
how get data from diferent list? and diferent group..
please help me......
|
|
|
|
|
I'm trying to create an application that utilizes one button to record the start and end time. If the user clicks it once the app records the current time as the start of the function. If it is clicked again the end time of a function is recorded. The name on the button preferrably would change from start to end. I'm looking into trying this due to a limitation on the number of buttons allowed on a school project.
Thanks
|
|
|
|
|
DateTime.Now will give you the time right now. You can store this and subtract it from the current time the second time the button is pressed. The button has a Text property you can use to change what text is on it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have an existed Excel file (My_Excel.xls) with pure data, when I try to open it as database ... following SQL define requires a table name (what_table?) in order to access it:
<br />
conn = "Provider= Microsoft.Jet.OLEDB.4.0; Data Source=" & Environment.CurrentDirectory & "\My_Excel.xls; Extended Properties=Excel 8.0;"<br />
<br />
Dim SQLString As String = "SELECT * FROM what_table"<br />
<br />
DBCon = New OleDbConnection(conn)<br />
DBDat = New OleDbDataAdapter(SQLString, DBCon)<br />
DBCom = New OleDbCommandBuilder(DBDat)<br />
DatT = New DataTable<br />
<br />
DBCon.Open()<br />
DBDat.Fill(DatT)<br />
DBCon.Close()<br />
How can I define My_Excel.xls the table "what_table" in order to use the above code?
Thanks to any help
|
|
|
|
|
Define a named range in your spreadsheet called what_table that represents the data area you want to access.
Paul Marfleet
|
|
|
|
|
It is working.
Thanks
|
|
|
|
|
Good stuff.
Paul Marfleet
|
|
|
|
|
I have been struggling with this issue off and on for the last couple of weeks. I created a .NET project with a class that will be available to .NET and then another .NET project with a COM class that will make that first class available to VB6. I am not letting Visual Studio register the object for COM and am doing that myself. I am using the following commands to register the assembly.
gacutil /i TestCode.dll /f<br />
regasm TestCode.dll /tlb:TestCode.tlb /codebase
I am able to see the assembly in the references box in VB6 and I can use the intellisense but it wont let me use it. I have tried the following 2 ways to instantiate the object.
Dim objTestCode As New TestCode.Testing
and
Dim objTestCode As TestCode.Testing <br />
Set objTestCode = New TestCode.Testing
Neither of those allow me to use the code. At one time I was able to use the assembly but that was last Friday and it was when Visual Studio was doing the registering for me. The reason I am manually registering it on my own box is that I want to replicate what will occur when this is deployed to multiple servers.
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
|
|
|
|
|
Howdy, Cleako,
I think I may be up against a similar problem. It sounds as if we're both aiming for the same goal.
What failure do you get when you say that "it won't let me use it" ??
I posted the following question yesterday as well on a different forum within this site.
--Chris
---------------------------------------------------------------------
Howdy,
I am an RF engineer (read: non-programmer!) building a library of GPIB-instruments that I can use from various applications (.NET C#, Excel VB6) to script a few tests. This article has been *extremely* useful, although now I'm stuck at one error in Excel VB6 I can't resolve:
"File or assembly name instrument_drivers, or one of its dependencies, was not found"
What does seem to be working correctly:
- My dll, "instrument_drivers", shows up in the list of VB6 references
- I can 'Dim x As instrument_drivers.HP8648C' in my code (and the intellisense does recognize all of the class subroutines that I've made public,
- I can 'Set x = New instrument_drivers.HP8648C', again with confirmation of intellisense,
- I can 'x.open_device(23)', one of the subroutines
But, I get the above error when I go to run it. Google searches churn up similar problems from other programmers, notably opening permissions in a windows temp directory and disabling file indexing. All done, no luck.
Any ideas or comments are greatly appreciated,
--Chris
|
|
|
|
|
I ended up not using the gacutil /i part and just used the regasm part but it became a 2 line command.
regasm TestCode.dll /codebase<br />
regasm TestCode.dll /tlb:TestCode.tlb
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
|
|
|
|
|
I was having the same problem. the /codebase switch made it work. Thanks!
|
|
|
|
|
Curious. How are you adding the COM Guids to your assembly?? When I need to create a COM component in VB.NET, this[^] is the template I follow.
|
|
|
|
|
I used this[^]. The class worked great and I am still confused why they say I must use
Regasm AssemblyName.dll /tlb: FileName.tlb /codebase
and not
Regasm AssemblyName.dll /codebase<br />
Regasm AssemblyName.dll /tlb: FileName.tlb /codebase .
I may be totally wrong but the only thing that worked for me was that 2nd way which I found here, partially[^] but I ended up having to use the combination of the 2.
I was successful installing to the GAC but the combination of installing to the GAC and registering the assembly seemed to confuse the code.
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
|
|
|
|
|
I'v created a crystal report with the 'mail label' expert and everything is working fine. But now I want to adjust the size of the label, but I can't seem to find where I can do this without remaking the report with the wizard.
Anyone know where this is located?
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
Would like to find a simple tutorial that will use web services to return a simple number to start with client/server must be cross platform different language for instance VB.NET to Java but they must consume the same XML or SOAP etc. I am a beginner and have tried several tutorials but they never seenm to be as you would like. They always have errors that i dont understand at present. Can you point me in the right direction been tring this for 10 days now with no success.
|
|
|
|
|
There's a walkthrough in the MSDN documentation that comes with Visual Studio. Open Visual Studio and hit F1. In the Documnet Explorer that comes up, click on the Index tab, then type "Web service, creating" into the "Look for" box.
|
|
|
|
|
Hi Dave
I know it is basic stuff but some time when you are looking on the web some people just put all the crap under the sun on it and just does not help thank you
|
|
|
|
|
im trying to make it to where i can browse for the ".txt" files and load them to a datagrid, and how to save ones that have been edited in the data grid.
if anyone can show me some code or link me to it
that would be great.
thanks
-Chris
|
|
|
|