I know the single quote issue is well documented throughout t'internet but I can't find reference to my particular problem. I have also read up on SQL injection.
I have my data and stored procedure in an SQL 2000 database. I have an HTML page with 2 input boxes - 1 numeric and 1 text. The 2...
When I was doing this sort of thing, I used to use this to make sure all was well with Outlook.
' Declare module level variables
Dim mOutlookApp As Outlook.Application
Dim mNameSpace As Outlook.NameSpace
Dim mFolder As MAPIFolder
Dim mItem As MailItem
Dim fSuccess As Boolean...
I think I've used somthing like this in the past but I'm not sure.
Set accDB = CreateObject("Access.Application")
accDB.OpenCurrentDatabase("Database Name")
accDB.DoCmd.OpenModule "Module2","CreateSpreadsheets"
accDB.CloseCurrentDatabase
accDB.Quit
This runs a sub called...
Just to make sure do you just need to establish a connection or extract some data?
I normally do something like this.
sqlString = Some SQL
conn_String="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(Database name)
Set objConn = Server.CreateObject("ADODB.Connection")...
Bloody, bloody, bloody hell. I got Bryan Robson. I need to have a long hard look at myself!
I despised him when I was a teenager and was delighted when he got injured at the 86 World cup. Peter Reid took his place and showed him how to run after Maradonna, albeit very slowly.
Bryan bloody...
I would check to see if there is any records first...
Set rs = db.OpenRecordset(strSQL)
If rs.recordcount <> 0 Then
rs.MoveLast
n = rs.RecordCount
rs.MoveFirst
etc
This will work because before you move last the .recordcount value will be 0 for no records and 1 (or the...
It sounds like you've linked the SQL tables into your Access database. Try this to see if this gives you a better response time.
Private Sub SERIAL__Change()
Dim db As Database
Dim Rst As DAO.Recordset
Set db = CurrentDb()
SNvalue = Me.SERIAL_.Text
Set Rst = db.OpenRecordset("SELECT [Serial_No]...
Thanks everyone. Big2s post got me thinking (cheers BIG2). I know what I'm going to do now. I've tested it and works well and I'm happy with the response times etc. I followed Kodo's link and read long and hard and decided to do my paging server-side as it seems to be the most effiecient way...
Sorry about this but I need your help.
I am looking for a way to return the number of rows from a select query to a variable in vbscript. I can get a value to return but it's not what I want. I get 1 if the SQL returned any Rows and 0 if it didn't.
I am using a RETURN VALUE parameter in my VB...
I'm not really a maths person but here goes...
7 divided by 4 = 1.75
the remainder = 0.75
times this by 4 and you get 3.
12 divided by 5 = 2.4
the renainder = 0.4
times this by 5 and you get 2.
See were I'm going with this?
Dim Num1 as integer, Num2 as integer
Dim Whole as integer...
I met a girl in the pub this weekend. She was quite attractive, witty and intellegent. She was rather keen and wouldn't let me out of her sight. Eventually I had to go to the toilet and she followed me in. I was just unzipping my trousers and she said, "Let me help you with that". After I was...
Happy Birthday Brian. Enjoy your nosh tonight...
My other favourite is..
Oxo have launched a new gravy to celibrate Evertons European adventure this year. It's called Laughing Stock.
Take care
One for BrianWarnock
An extract from the Liverpool Echo (Liverpools Evening Newspaper)
LIVERPOOL ECHO(AP) - a 7 year old boy was at the centre of a Liverpool courtroom drama yesterday when he challenged a court ruling over who should have custody of him The boy had a history of being beaten...
Hi,
Try this...
range("A1,D4,L9").font.bold = true
You can do this too...
range("A1:A5,D4:E4,L9:L13").font.bold = true
As long as you seperate your ranges with commas you should be OK.
Take Care.
This little sub will give you the general idea. There is probably a more elegant way to do this but this is all I could think of at the moment.
Sub ColCount()
Dim myRecs As DAO.Recordset
Set myRecs = CurrentDb.OpenRecordset("MSysAccessObjects")
MsgBox myRecs.Fields.Count...
TransferSpreadsheet is the way I would go.
This is how I normally do the Excel bit...
I use ExcelSheet because this is where most of the action will take place at sheet level.
Looking at your code, I would have written it like this...
Dim appExcel As New Excel.Application
Dim...