|
Microsoft says "Starting with version 2.6, MDAC no longer contains Jet components. In other words, MDAC 2.6, 2.7, and all future MDAC releases do not contain Microsoft Jet, Microsoft Jet OLE DB Provider, or the ODBC Desktop Database Drivers. No new feature enhancements will be made to Jet."
What's happening is you're probably having Paradox ODBC driver differences between Windows 98 and XP, possibly stemming from use of Unicode, or many other factors. If it's working in the XP to 98 direction, just create your tables on XP and distribute them to the downlevel Win98 clients.
FYI. Microsoft ended OEM retail license availability of WinME on December 31, 2003; Win98 (all versions) on June 30, 2002; Win95 on December 31, 2000 and Win3.x and below (yes there was a 1.x and 2.x) on 31-Dec-2001. Win2k Pro will end OEM retail license availability on March 31, 2004. NT 4 Workstation ended June 30, 2002.
NT 4 Service pack updates: No further updates planned.
|
|
|
|
|
Hi, Folks!
In my applications I build an insert statement by concatenating several strings together, adding values by first using sprintf to get a string of the value. These values are defined in my database as floats, so all this conversation results in a loss of precision.
I believe the right way to do this is to bind my application's variables to the connection. However, the only call I've come across to do this with is SQLBindParameter. The problem I have is this: the call needs to know the parameter's ordinal position in the database schema. In my apps I don't always know this; I only know the column names.
So, it boils down to this: is there a way to get a column's parameter number from its name?
'til next we type...
HAVE FUN!! -- Jesse
|
|
|
|
|
Jesse Evans wrote:
The problem I have is this: the call needs to know the parameter's ordinal position in the database schema. In my apps I don't always know this; I only know the column names
I think you might be incorrect here. It's not the ordinal position in the database schema, but rather the ordinal position within the SQL statement you are binding to.
Chris Meech
We're more like a hobbiest in a Home Depot drooling at all the shiny power tools, rather than a craftsman that makes the chair to an exacting level of comfort by measuring the customer's butt. Marc Clifton
VB is like a toolbox, in the hands of a craftsman, you can end up with some amazing stuff, but without the skills to use it right you end up with Homer Simpson's attempt at building a barbeque or his attempt at a Spice rack. Michael P. Butler
|
|
|
|
|
Chris Meech wrote:
It's not the ordinal position in the database schema
<grok=true>
Ah, I get it now! Thanks, Chris!
'til next we type...
HAVE FUN!! -- Jesse
|
|
|
|
|
Hi,
How to find the records which contain '%' or '_' in a oracle table?
Thanks in advance.
|
|
|
|
|
You should search for Wildcard Charactersvin its help.
Mazy
"Man is different from animals in that he speculates, a high risk activity." - Edward Hoagland
|
|
|
|
|
I am trying to convert a native DB to MS SQL server. When I want to acces a specific collumn the output contains only fuzzy characters. So I tried to cast the datatype to an integer type. This does not work. The only thing I know is that the datatype of the native DB is DBTYPE_STR.
Who can help me convert this datatype to an integer value?
Robert Smit
|
|
|
|
|
i have problem during my project ........
i want to convert the procedures of pl/sql into T-sql
i am converting the procedures of oracle into sql server
using vb.net kindly someone help me out.
best of luck
|
|
|
|
|
"best of luck" is about right.
You need a good book on T-SQL and/or PL/SQL, depending on how well you know one of them to start with.
Where I work we support ORACLE 9i and SQL Server 7 (and later), so when we use stored procedures, we have to write them twice (and make sure they are compatible in terms of parameters etc).
Steve S
|
|
|
|
|
i am trying to figure out a solution for locking rows for editing via the web, the problem is i cannot figure out how to unlock the row effectively
desired behavior:
user 1 searches for and finds 3 records, clicks link to edit record 2
user 2 searches for and finds the same 3 records, goes to edit record 2, but gets "row locked" message, or likewise
user 1, finished with editing
user 2 can now edit the record
problem is i cannot figure out how to track if user 1 finishes, IE closes the browser window...
any thoughts on how i could possibly implement this?
i will be using ASP.NET and T-SQL
|
|
|
|
|
I would say...don't. Locking a row when a web user clicks to edit a record is a bad idea, for exactly the reasons you mention, you don't know if they're going to actually come back and submit any changes. If you really have to make sure that two users aren't editing the same data, use some sort of timestamp to detect whether someone else has made a change before saving the web user's changes.
Marcie
http://www.codeproject.com
|
|
|
|
|
thanks! i suppose the timestamp thing is the best approach.
i cannot have possible simultaneous edits work akwardly, i don't there to be lost data.
So i guess i will have something akin to:
On Edit screen load: Show current record contents, grab "last edited"
On save: check "last edited" and if it matches: apply update, otherwise handle the problem, (probably best would be to show both sets of data)
|
|
|
|
|
Hi everyone,
I am using ADO.NET with Access. I have a dataset filled from a data source which has one-to-one correspondance with an Access table. I would like to know what is the most efficient way to fill the Access table with this dataset. Should I iterate through the dataset and call SQL inserts?? I am hoping there is a better way.
Thank you for any help you might give me.
Sincerely,
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Did you tried to use Table Direct for Fill data set
D!shan
|
|
|
|
|
Hi,
I am sorry I do not understand what you mean. Could you please elaborate on it?
My problem is that the dataset is filled from an SQL server database. Now I need to dump the contents of this dataset in an Access table. So, I would like to determine which is the most efficient way to do this. I can of course call an UPDATE statement for each row in the dataset, but I have a feeling that there might be a better way
Thanks,
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Hi
You can build a multi sql statement and execute it once!. you dont need to execute singel insert / update statements many times.
Ex. sSQL = "INSERT INTO .....;INSERT INTO ...;INSERT.."
executeQuery( sSQL );
HTH.,
D!shan
|
|
|
|
|
I wish to count the number of records in my table and then display the number on the screen
So i done:
SQLQuery = "SELECT COUNT(*) FROM Log"<br />
Set RS = OBJdbConnection.Execute(SQLQuery)<br />
Response.Write(RS.RecordCount)
But i'm getting into a muddle on how to do it.
Can someone please show me the light.!!
---
Peter M
|
|
|
|
|
First of all, does the Log table have an primary key index, preferable an autoincrementing ID. It would be much faster as the log file table size increases to do a 'select count(ID) from log' than doing a count(*). Executing a count(*) may induce a table scan while count(ID) will only scan the primary key index.
2nd, you should probably execute a OBJdbConnection.ExecuteScalar rather than a execute. The executescalar is designed to return a single value which is what you are looking for.
Dim rowCount as object
SQLQuery = "SELECT COUNT(ID) FROM Log"
value = OBJdbConnection.ExecuteScalar(SQLQuery)
if not value is dbnull.value then
'Make sure you didn't receive a Null from the database.
'If not it should be an int or int32. Can't remember which one is actually returned.
Response.Write(value.tostring)
end if The above is not tested but you should get the idea.
Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
Yes it does have a primary index, which is just a auto number.
Before I recieved your message, I managed to get things working by doing the following
<br />
SQLQuery = "SELECT * FROM Log" <br />
Set RS = OBJdbConnection.Execute(SQLQuery)<br />
<br />
While (Not RS.EOF)<br />
sTotalpages = sTotalpages + 1<br />
RS.MoveNext<br />
Wend
Maybe its a crude way to count the pages.
I'll give your code a try now
---
Peter M
|
|
|
|
|
Well I tried your code but I get the error
"ADODB.Connection error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/Includes/paging.asp, line 12 "
I couldnt' get the tostring to work, so i took it out as well as the error checking, as they will not be blank fields (we are checking the primary after all)
So the code ended up
<br />
dim sTotalpages<br />
SQLQuery = "SELECT COUNT(ID) FROM Log"<br />
sTotalpages = OBJdbConnection.ExecuteScalar(SQLQuery) 'Line 12 - the error point<br />
Response.Write(sTotalpages)
I'm rather confused to why I am having problems, i mean it looks easy enough, there is obviously something I am doing wrong.
Well I'll go back to my old method for now, and have a break, and come back to it later
---
Peter M
|
|
|
|
|
Here this works:
Dim cn As New System.Data.SqlClient.SqlConnection(_connectString)
Dim value As Object
Dim cmd As New System.Data.SqlClient.SqlCommand("Select count(SampleID) from tblSamplesSample")
cmd.Connection = cn
cn.Open()
value = cmd.ExecuteScalar
Response.Write(value) Change the select statement and add your connect string.
Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
Definitely give it a try. It probably has bugs since it was written on-the-fly but looping through the recordset is definitely an insufficient way of doing it. ExecuteScalar with the count being on the primary key is probably the most efficient way of obtaining the count.
Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
Tried again, but could not get it to work, I had a feeling that the code you submitted was in ASP.NET, which my friend David Wulff confirmed for me.
My host (oneandone) does not allow me to use .NET, which explains things, i've managed to get things to work now with the following code, incase anyone else reads this in the future
set rs = OBJdbConnection.execute("SELECT count(ID) as total from Log")<br />
sTotalpages = rs("total")
Thanks for your time, its appeciated!
---
Peter M
|
|
|
|
|
SQLQuery = "SELECT COUNT(*) AS 'NoOfRows' FROM Log" and use executeQuery
D!shan
|
|
|
|
|
Could not get this to work with executeQuery, as mentioned with Dr X, this might be because the code is ADO.NET?
Your all using space age technology compared to me, i'm not on the .NET train yet
Thanks for your time otherwise
---
Peter M
|
|
|
|