Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. NickISD

    Date format issue SQL7

    Not 100% sure what you are trying to return but try this. You can substitute the GetDate() for a date field within a table. Also I would not use int's to store dates use an Sql server datetime one instead. Hope this helps, Regards, Nick SELECT '10' AS...
  2. NickISD

    Best "grid" component for editing recordset with columns NOT in order

    I agree with Peters recommendation, go with Janus. It handles all the data for you. Zemp is quite right that the flex grid can be setup as an editable grid using text boxes positioned over the cells, although it works I feel it makes the app look a tad clunky in operation. If you do go this...
  3. NickISD

    HOW TO Append a new field in an existing Table ???

    Marco, Try this as an execute query to the database, Dim cSql As String cSql = "ALTER TABLE Table1 ADD COLUMN FieldName Text(20)" CurrentDB.Execute(cSql) The execute may not be quite right but the SQL is correct. Hope this helps Regards, Nick
  4. NickISD

    ADO Update Problem ***URGENT***

    I agree with Peters comments and would add you need to change the newrs.CursorType = adOpenStatic statement to be either adOpenKeySet or adOpenDynamic. Static recordsets support scrolling forward and backward; changes made by other users are not visible. Regards, Nick
  5. NickISD

    Transfer records from one db to another

    MDA, Just saw this in SQL Server 2000 help file. I think after completing this you can then query the other database using a single connection so it could make your transfer of data easier. Regards, Nick How to set up a linked server (Enterprise Manager) To set up a linked server Expand a...
  6. NickISD

    Transfer records from one db to another

    MDA, One method could be to change the SP, place new data created by the SP in to a temp table then use VB to query the temp data and then insert to second server using seperate ADO connections. Or you could set up replication on the first server to create / update the tables on the second one...
  7. NickISD

    Insert from one recordset to another?

    I can't see anyway of using ADO to do this in one execute, unless someone knows different. You could however use the code below. You'll need to set a ref to MS Access 9.0 Object Library - this may well work for you. Regards, Nick Public Sub ImportText(FileName) Dim Acc As New...
  8. NickISD

    Insert from one recordset to another?

    Sorry, see what you mean. The db.Execute "INSERT INTO returns SELECT * FROM rsWorkFile" will not work because the query is looking for a table named rsWorkFile because it is enclosed within the quotes. I don't know if it is possible to query a flat file and insert to a table in one SQL...
  9. NickISD

    I need code to link table access 97 in another access 97 db ?

    I assume your using ADO, is so set a reference to MS Jet and Replication Objects, this allows you to link tables. Below is a small section of code I use, you should be able to pick the bits out you need to make it work for you. Regards, Nick For Each tblMST In cat.Tables If tblMST.Type...
  10. NickISD

    Insert from one recordset to another?

    Hi, The problem is your Execute, it's trying to INSERT into a table within the connected database and as returns is not a valid table name you are getting the error. I suggest you insert the data you require from the recordset and the flat file then run a query to select the data from the temp...
  11. NickISD

    Non-immediate upadate of Access DB

    Hi, Access is a real pain with this problem. It's to do with a cache setting within the registry, even if you change it, it makes no difference. To get round it make a reference in your VB project to Microsoft Jet and Replication objects. Dim JRO As Jro.JetEngine ' After updates, executes etc...
  12. NickISD

    When selecting a date from a DB, It never seems to work.

    Hi, Try this - it works fine for ADO against Access or SQL server dates.Note date is wrapped by single quotes for SQL server, for Access replace single quote with #. If you always use the format below by using mmm then regardless of database date order it should still work. One final point, only...
  13. NickISD

    How to Bold text in Txt file printing

    Hi, You'll have to use the VB Printer object to print it, you can't do a huge amount of formting with it but you can open the file and between the file read lines add Printer.FontBold = True Printer.Print MyTextLine Printer.FontBold = False You can also use TAB() as well eg. Printer.Print...
  14. NickISD

    Speed of two large joined access tables!

    horak, your delay (especially with Access 2k) for the first record is where the table is being opened and cached. The subsequent inserts are usually fairly quick. I would however, for performance split the tables down to a more manageable level. This would help in recorset performance. Also with...
  15. NickISD

    ERROR: Could not update; currently locked by user 'Admin' on machine..

    Brandon, I've had similair problems with ADO updating an Access database. To get round adding in delays all over the code I set a reference to Microsoft Jet and Replication Objects, in code have DIM JRO As New Jro.JetEngine. Then after inserting rows using execute method add the line...
  16. NickISD

    How to know the no of users accessing the server ?

    Have a look at the stored procedures SP_Who and SP_Who2, this will tell the logins currently active within SQL server plus a whole load of other information. You can return this data to a recordset within VB. Regards, Nick
  17. NickISD

    Help with SQL

    Following on from Ladyhawk you may also need to test the value set for IDTable1 if you have a unique key on this field, if you do and the value for IDTable1 already exists within the table you will get an error. So within the insert module / function make sure you have adequate error trapping...
  18. NickISD

    Using the <recordset>.EOF function problem

    Hi, Placed your code in to VB and changed the MDB to an Access 2000 one I have and it worked Ok to a point. Your test for EOF will not work if more than one record is returned as it will not be true. Try changing the test to be :- If Not (rsProblem_ID.EOF And rsProblem_ID.BOF) Then ' Data found...
  19. NickISD

    Using the <recordset>.EOF function problem

    tjessejeff, If you can post back the code you are now working with it will give us more of a clue as to where the problem is. For recordsets I've always used :- If Not (rs.EOF And rs.BOF) 'data exists Else 'No Data Found EndIf Regards, Nick
  20. NickISD

    Check if SQL table exists

    How about :- cSql = "SELECT name FROM sysobjects WHERE name = 'MyTable'" Set rs = Db.OpenResultset( etc etc - make ADO recordset) If Not (rs.EOF and rs.BOF) Then 'Table name exists, show user message Else 'Table does not exist Endif Hope this helps. Regards, Nick

Part and Inventory Search

Back
Top