473,837 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can u say how to write scripts for MS- Access

52 New Member
Hi All,
i have some simple scripts( which may have some insert statements, update statements etc). these scripts were written in Sql server 2000. now i want to use the same scripts in Access. (since the data is same in both Access, Sql server databases).

can i write the scripts in Access-2003? if so please help me.
Actually i tried with simple examples. it is working fine for insert, update statements. but it is not working for "If" state ment, and Select statement.

i tried it by using "modules" in the access data base. in module i created macro. in that macro, i am reading the queries from a .txt file with the help of Vb syntax, and am executing that staetement.
i wrote as.....
Expand|Select|Wrap|Line Numbers
  2.      Option Compare Database
  4.   Sub macro1()
  5.        Dim sFileText As String
  6.        Dim strQuery As String
  7.        iFileNo = FreeFile
  8.        Open "c:\sample1.txt" For Input As #iFileNo
  9.        Do While Not EOF(iFileNo)
  10.            Input #iFileNo, sFileText
  11.            strQuery = Replace(sFileText, "99", ",")
  12.           DBEngine(0)(0).Execute strQuery
  13.        Loop
  14.  End sub
while reading the data from .txt file, the input method is unable to read the entire line due to the commas (,) so i used 99 instead of ,
it is working fine for insert, update statements.
but if i write some if statements, in the .txt file it is giving the error.

Please suggest me any way to write the scripts.

thanks in advance...
Jan 9 '08 #1
2 3511
254 Recognized Expert Contributor
Just a thought...

If both your Access and SQL tables contain the same data

Why not leave it in SQL and link to the table?
Why not use DTS to update the Access database if linking isn't an option?
Jan 9 '08 #2
52 New Member
Hi jaxjagfan,
i want to do few changes only on the Access database. for those few changes i have my own scripts written in Sql server 2000. so i want to run those scripts in Access.
and i don't know about DTS .

can i write and run the scripts in Access ?
if so please let me know how to do?

Thanks in advance....

Just a thought...

If both your Access and SQL tables contain the same data

Why not leave it in SQL and link to the table?
Why not use DTS to update the Access database if linking isn't an option?
Jan 9 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Aardwolf | last post by:
I've had PHP on my Win2K server running IIs 5 for about 2 weeks now. I have an annoying problem in that I can not run the php scripts/pages locally, instead they open up in the browser as a download. By that I mean that If I access them via my lan or the net from another computer on my lan, the webpages that have php on them and end in a .php extension all run fine and work just great. BUT if I open up the browser on the IIs server...
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be assigned to a variable and output using document.write. (Note, there is no submit button or other form elements. Basically
by: Radek Maciaszek | last post by:
Hi It's very interesting problem. I couldn't even find any inforamtion about it on the google. I think that the best way of explain will be this simple example: <html> <body> <script language="JavaScript" type="text/javascript" src="write.js"></script>
by: comp.lang.php | last post by:
Original thread in http://www.phpbuilder.com/board/showthread.php?p=10659321#post10659321 I have CRON scripts with owner/group relationship of "phillip/apache" that need to access directories within the docroot. The directories, if I create them, will have owner/group relationship of "phillip/apache", and all is well since they are all group-accessible (permissions of 0770). However, I have a web app within the docroot that has the...
by: AVB | last post by:
Is there any other way to write files to a directory than allowing the IUSR write access. We have a website that will be writing XML files and Label files to a directory outside of our website directory but I am hesitant to give the generic IUSR account write access to anything and wondered if we could asign a different account or if there was some sort of ASP script we could use. These files will be created based on a received XML string...
by: Sanja Tanasijevic | last post by:
I have serious problem setting read/write privilegues to the folder for customers upload files and photos including possibilities to read them too. Version of IIS is 5.1 and I set up this folder in IIS to have read, write, directory browsing and execute scripts. Also I set up anonimous access, I even tried with All Tasks -> Permissio Wizard but it doesn't help. Error "Access to path @c/Inetub/wwwroot/projectname/customerfolder/CustomerID is...
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this OleDbParameterCollection" whenI try to write a new record. Delete and Modify work fine its just the add record function causes the error.
by: eholz1 | last post by:
Hello PHP Group, I am having trouble setting permissions correctly so that the magickwand api (php 5.2) can read and write images. I usually read a file from one directory, create a magickwand resource from that file, and transform the image, and save the new image with a new name to a different directory. I have seen that my file and folder permissions when set incorrectly,
by: _mario.lat | last post by:
hallo, I use PHP and I'd like to not write in hardcoded way password and login to access to mysql. how to not write password in code for access to mysql? How can I do? I'd like that who see my code don't see my paswords. there is a solution? Thank you in advance. Mario.
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.