|
I have to make a website on a win2000 server with ASP.NET. This website has to retrieve data from a db2 database on a linux server. Can someone tell me if this is possible and how I should do it?
ASP.NET is not a problem, but I have never worked with db2 and linux before.
Ludwig
|
|
|
|
|
I'm using the OLEDB consumer templates and VC6.
Is there a way I can get a rowset of data from the database, disconnect from the database, and then work with the data in a disconnected scenario.
Like disconnected ADO recordsets, but using plain vanilla OLEDB.
I've searched all over google(groups) and come up empty, plenty of similar questions to mine, but no useful answers (if any).
Bruce Duncan CP#9088, CPUA 0xA1EE, Sonork 100.10030 Hi everyone. My name's Bruce. And I suffer from VB.
|
|
|
|
|
I don't know if it exists in OLEDB or not(I think it does).Use adUseClient for your cursor type.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Is it possible adding a db user by script like creating a db by script etc...
Thanks
|
|
|
|
|
I have written a DTS package that when run can takes a considerable amount of time to complete. I have found the problem areas within the package where a mass delete is taking place. Since I am unaware of future dataset sizes it will be deleting, is it possible to have my ActiveX script only increase the connection timeout period when it would typically timeout under the default time period. Or would it be considered ok to just increase the timeout period regardless of the dataset size? Thanks.
Nick Parker
|
|
|
|
|
Well , I wrote a little app in VB that queries a table. I used DAO.I created a SQL generator that builds up a statement. But somehow only if I use * instead of % it works. For example , if i execute
select * from Phonebook where Firstname like 'M*'
I will get the appropriate records beginning with M. but if i write:
select * from Phonebook where Firstname like 'M%'
than all i get is an empty recordset! Why is that?! i remember that i used % before and it worked just fine. maybe someone knows what is the problem? thx!
|
|
|
|
|
% is standard SQL, however Access (and thus DAO) uses *.
I got bit by the opposite problem when I made the transition from DAO to ADO/SQL Server
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
Ahh thanks. And what about ADO ? Does it work with % or must use * too ?
|
|
|
|
|
That I'm not sure about, I think it uses * for Access and % for others, but I'm not sure as I haven't done any ADO on Access. Oddly that was one combination I was able to avoid.
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
James T. Johnson wrote:
but I'm not sure as I haven't done any ADO on Access
I used it.You have to use % .
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Dan Pomerchik wrote:
And what about ADO ? Does it work with % or must use * too ?
In ADO You have to use % .
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Oh this is crap, every time you have to use a different character
Why can't they just SET a STANDARD and USE it in all db's/platforms/etc.!?
Anyway thanks guys, good to have some people who help
|
|
|
|
|
Dan Pomerchik wrote:
Why can't they just SET a STANDARD and USE it in all db's/platforms/etc.!?
How do you think they keep us on our feet?
|
|
|
|
|
Dan Pomerchik wrote:
Why can't they just SET a STANDARD and USE it in all db's/platforms/etc.!?
How do you think they keep us on our feet?
Don't you hate it when you forget to log on with the message boards?
Nick Parker
|
|
|
|
|
Nick Parker wrote:
How do you think they keep us on our feet?
Nick Parker wrote:
Don't you hate it when you forget to log on with the message boards?
Actually, I'm allowing those cookies so I don't have to log on
Btw, I tried to change the default password I got and somehow it won't change. Does anyone knows something about it ?
- Dan
"Intel inside - Idiot outside"
|
|
|
|
|
There is a standard, %, I don't know if its in writing but everything I've seen except Access uses it
Access (and DAO) is used on windows only, so it made sense to use * as the 'match anything wildcard' which is what windows uses.
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
Because * replace the rest of characters and % replace only One Character....
For Example if you have a table with the following records
Mother
My
Mine
M* get all the records
and M% only the Second Record...
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Carlos Antollini wrote:
M% only the Second Record...
No,Carlos.Thats not true.'%' get all of them too.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Mazy It's True...
I found the following:
Kind of match Pattern Match (returns True) No match (returns False)
Multiple characters a*a aa, aBa, aBBBa
*ab* abc, AABB, Xab aZb, bac
Special character a[*]a a*a aaa
Multiple characters ab* abcdefg, abc cab, aab
Single character a?a aaa, a3a, aBa aBBBa
Single digit a#a a0a, a1a, a2a aaa, a10a
Range of characters [a-z] f, p, j 2, &
Outside a range [!a-z] 9, &, % b, a
Not a digit [!0-9] A, a, &, ~ 0, 1, 9
Combined a[!b-m]# An9, az0, a99 abc, aj0
Best Regards....;)
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
In T-SQL (SQL Server) the % character will do a wildcard beyond that point(all characters)
'boo%' results in book, books, boobs....
the _ character will act as a single wildcard
'b_ok' will find anything for the second character(i.e. - book).
Nick Parker
|
|
|
|
|
Oh thanks a lot , that explains everything
- Dan
"Intel inside - Idiot outside"
|
|
|
|
|
Dammit!
I'm totaly confused now!
Someone said that % is for one char and * for all. Someone else said % is standard and * for DAO/ADO. What happening!?
- Dan
"Intel inside - Idiot outside"
|
|
|
|
|
I have an app that emails automatically from an ASP page - it works fine but for one specific user I get the error message "MSG 17914, Level 18, State 1, line 0 - Unknown recipient: Parameter '@recipients', recipient 'nameofuser'" where 'nameofuser' is of course, the name of the user. Am I missing something? What's different about this guy that he can use xp_sendmail?
-----------------------------------------------------------------
I found out 2day that he can execute xp_sendmail IF he is listed as recipient = 'nameofuser@coname.com' as opposed to just 'nameofuser' like everyone else. He has the same permissions on the server as the other users - I'm still REALLY confused! but he's a happy user & I'm good 4 now... any ideas?
|
|
|
|
|
Hi,
Ok - first a plea! I NEED help with this - it's been driving me crazy and I know it's a really simple problem, but I've been too knocked out with this stupid code to spot it.
I have an Access database with several tables, including one named tblSchedule. It has seven fields, declared in this order:
ID - Autonumber
EmployeeID - Number
JobID - Number
Date - Date/time
AreaID - number
Description - text
Status - Number
You can download a database containing the exact schema for this table here.
OK, now, in VB I have the following code:
' Write a schedule entry to the database
'
' IN
' sched - the schedule entry
'
' OUT - success?
Public Function CreateScheduleEntry(sched As cScheduleEntry) As Boolean
On Error GoTo Error
Dim adoConn As New ADODB.Connection
Set adoConn = OpenDatabase
adoConn.Execute "INSERT INTO tblSchedule " & sched.FormatSQL & ";"
adoConn.Close
CreateScheduleEntry = True
Exit Function
Error:
CreateScheduleEntry = False
Exit Function
End Function
The schedule object looks like this:
Public ID As Integer
Public Employee As cEmployee
Public job As cJob
Public ScheduleDate As Date
Public Area As cArea
Public Description As String
Public Status As Integer
' Returns a SQL statement formatted for an INSERT INTO statement,
' of formtat ({fields}) VALUES ({values})
'
' IN
' OUT - SQL string as described above
Public Function FormatSQL() As String
FormatSQL = "(" & _
"EmployeeID,JobID,Date,AreaID,Description,Status" & _
") VALUES (" & _
Employee.ID & "," & _
job.ID & "," & _
"#" & Month(Date) & "/" & Day(Date) & "/" & Year(Date) & "#," & _
Area.ID & "," & _
QuoteString(Description) & "," & _
Status & _
")"
End Function The INSERT INTO fails EVERY time. So I thought, well, if I can't get it to work this way, how about executing a basic INSERT INTO statement against the table. But that doesn't work either:
INSERT INTO tblSchedule (EmployeeID,JobID,Date,AreaID,
Description,Status) VALUES (1,2,#4/1/2002#,4,'test',1) Any help on this will be really really really really really appreciated. I just know it's gonna be a stupid, simple, problem, but at the minute I'm too blind to see it.
The QuoteString function just double quotes a string so that apostraphes don't mess up the SQL statement. This exact code, with changed field names, is used on another table and works fine.
Thanks!
--
Andrew.
|
|
|
|
|
If you rename the "date" column to "mydate" then the insert works. Looks like "date" is a reserved word un Access. I tend to use a common prefix across all of the columns in a table to ensure that I don't get a reserved-word clash.
|
|
|
|
|