10. (Advanced Programming In Access 2013) Using DAO to Connect to SQL Server in VBA

  Рет қаралды 46,873

Programming Made EZ

Programming Made EZ

Күн бұрын

Пікірлер: 56
@freebird7556
@freebird7556 5 жыл бұрын
I'm really sure your lesson is best!!! I keep playing your lessons on Access programming... for very long time... Thanks very much!!! I really appreciate.. always..
@funniq
@funniq 7 жыл бұрын
Thanks again for such a high quality tutorial. I really enjoy to watch and listen to your videos. You have a very friendly voice and very clear to understand for people with another native language :). Thanks again, kind regards, André (The Netherlands)
@rogerio74c
@rogerio74c 2 жыл бұрын
Yours videos are amazing!
@bobbanovski1
@bobbanovski1 7 жыл бұрын
I found that I can only get the connection to the database when I am more explicit: Set db = OpenDatabase("Northwind", dbDriverNoPrompt, False, "ODBC;DATABASE=Northwind;DSN=Northwind") The DSN connection was created in the previous ODBC tutorial and not this so that may be a factor.
@weibinren92
@weibinren92 2 жыл бұрын
Hi, could you elaborate further? I'm having the same problem, and resolved it with your command
@ragheblahbazi166
@ragheblahbazi166 8 ай бұрын
Thak you this was my problem also
@redhahamad6125
@redhahamad6125 3 жыл бұрын
Thanks for the wonderful tutorial! I am wondering if this option can prevent Hex Editor from reveal my front end file? Would it be the best option in term of security? Thanks you!
@paulsweeney5642
@paulsweeney5642 3 жыл бұрын
Great content.
@christiancarlodejesus5629
@christiancarlodejesus5629 3 жыл бұрын
In Access 2019, OpenDatabase is asking for manual selection of DSN even when explicitly coded, that is: Set db = OpenDatabase("Northwind", False, False, "ODBC;DATABASE=Northwind;DSN=Northwind") Help.
@ermacheton
@ermacheton 4 жыл бұрын
Steve, quick question, I was able to link ACCESS to SQL EXPRESS thru management studio 2012, After a couple of issues with some fields, I was able to fix everything and it works fine. So the question is, can I deploy this SQL database to an AZURE account so I can have multiple users connected thru the web to AZURE? Have you ever tried? any reference I can look into? thanks..
@bondniko
@bondniko 3 жыл бұрын
Hi, Steve. Doesn't dao require to close the connection and the recordset?
@divyabadineni2895
@divyabadineni2895 4 жыл бұрын
While inserting data from sybase to Microsoft Access database throwing an error syntax error insert into statement please help me.....
@weibinren92
@weibinren92 2 жыл бұрын
Why it is DSN-less connection when in the connection string we put the DSN name?
@markbuckland5015
@markbuckland5015 9 жыл бұрын
Hi again Steve. I have played around with the User DNS connection and manged to make the OpenDatabase action work by using a zero length string in place of the DSN name of Northwind. A list of Machine Data Source names including Northwind shows up and when I select Northwind the code runs listing all the Company names. The code line I used is as follows: "Set db = OpenDatabase ("", , , "ODBC;") When I substitute the Northwind name in place of "", I get the error of not being able to find the file. Thanks again for the great series and I will continue to work with and get it to work
@ProgrammingMadeEZ
@ProgrammingMadeEZ 9 жыл бұрын
+Mark Buckland Odd, if you named the DSN Northwind then it should be found.
@abdousamadhydara
@abdousamadhydara 3 жыл бұрын
Nice tutorial! How do you calculates in Excels students first term, seconds term an third terms in "sheet 3"?
@benedictbernard9343
@benedictbernard9343 2 жыл бұрын
Thank you so mmuch sir, this actually has help me as a beginner. please is it posible for me to email you on some question on challenges am having current so you could walk me through them?
@Thanogr1
@Thanogr1 6 жыл бұрын
DAO can be used for any database server connection? eg mysql
@sissokom.prodev9979
@sissokom.prodev9979 5 жыл бұрын
Hi Steve ! Thanks so much for your help .... can you show us how To alter a field To sqlserver Table from DAO, because there is no single documentation on this issue , and can not add column to linked table too ! Thanks
@Dinho_FTBL
@Dinho_FTBL 9 жыл бұрын
Hi Steve, if I have more than one building, is that a factor? do effect the speed if I deployed database as access FE and SQL server BE?, Thank you!
@ProgrammingMadeEZ
@ProgrammingMadeEZ 9 жыл бұрын
Bilal Kareem Yes, any FE/BE arrangement will be affected by network speed. However, this can be managed by making the data you request smaller. Make sure all of your SELECT statements are narrowed down to just those columns you actually need, and you use where clauses to get just the rows you need.
@Dinho_FTBL
@Dinho_FTBL 9 жыл бұрын
Programming Thank you Steve.
@benchpolo
@benchpolo 6 жыл бұрын
Hi Steve this is a great video that i've been searching for a long time. Question? so having to define the sql connection string do i still need the link tables to store new record and changes ? 2nd, how many connection strings can i establish in one access db?
@mightytfitness
@mightytfitness 9 жыл бұрын
Steve, thank you for sharing this video. I am actually having issues with the ODBC connect when I tried to get results/recordset from a saved parameter query (called in MS Access) or stored procedures (called in SQL Server), I got an error "item not found". Does DSN-Less connection not allow to perform Dao.Querydef? I read about that I have to do ODBCdirect connect. Can you provide help with this? Thank you in advance. TM
@codekabinettcomen
@codekabinettcomen 7 жыл бұрын
ODBC Direct Workspaces were a powerful way to connect DAO to SQL databases in a similar way as with ADO. Unfortunately Microsoft removed that feature with Access 2007.
@me2000
@me2000 6 жыл бұрын
i made a connection but not don't have idea, how to import a table from sql to access
@hr.sanders
@hr.sanders 5 жыл бұрын
great as always...
@Chiramisudo
@Chiramisudo 6 жыл бұрын
Dang it!!! Outstanding video, but nothing in your playlist on Stored Procedures in DAO? :(
@awalsaani5310
@awalsaani5310 9 жыл бұрын
Hi Steve! Thanks for this Awesome Video. I just want to know the best way to check that a connection is successful or not. That is, getting back a true Or false rather than getting the SQL Server Error. I am planing of putting it in my splash form on load event..such that when the end users launches the front end it checks for connection to the server if successful then opens the login form and if not successful then displays a user friendly message. Thank you!
@ProgrammingMadeEZ
@ProgrammingMadeEZ 9 жыл бұрын
Awal Saani Well you can do a "on error resume next" just before you run your opendatabase function. Then do a count on how many tables are found in the database. If tabledefs.count > 0 then you're connected.
@awalsaani5310
@awalsaani5310 9 жыл бұрын
Programming Thanks!
@techwithramsey
@techwithramsey 4 жыл бұрын
I was not able connect to the Customer table until I updated the OpenDatabase parameters to this: "Northwind", dbDriverNoPrompt, True, "ODBC;DATABASE=Northwind;DSN=Northwind"
@schalld1
@schalld1 Жыл бұрын
why not do a debug.print of the customers.connect to get the conn string
@swapnilwankhede3440
@swapnilwankhede3440 6 жыл бұрын
Thanks Steave.
@adityait11
@adityait11 8 жыл бұрын
Hi Steve, Thank You for the Help. Can you please help me with my Issue. I am having some Issue with the logic DAO. Actually I have a legacy application and was developed in access 97, Access 2002. And now we are in access 2013 (we cannot go back older versions) And I am not able to debug as the Initial load itself is failing with the error Compile Error: Can't Find Project or Library When I go to Tools ->References it says the that Microsoft DAO 2.5/3.5 Compatible libraries are missing And since I am using access 2013 I cannot get those libraries. Can you please give some suggestions to fix the Issue?
@ProgrammingMadeEZ
@ProgrammingMadeEZ 8 жыл бұрын
Have you tried referencing the newer version of DAO? If that does't work then you will need to fix all of the places in code that are trying to use the old DAO library with code to use the new one.
@adityait11
@adityait11 8 жыл бұрын
Hi Steve, Can you please help me doing it. How can i find the new version of DAO.i.e what is the new version of DAO. or Can you please suggest any sample for replacing the code Thank you Steve.
@cybetica
@cybetica 6 жыл бұрын
I think the lecture series is great - big thanks, its definitely filing in knowledge gaps for me (approaching Access from a SQL Server experience) - However you made one comment about ODBC vs OLEDB which I think is incorrect. OLE DB is newer than ODBC and in fact utilises ODBC drivers. OLE DB is, also richer in functionality - in that it can also connect to non database files - but is proprietary to Microsoft and so may not have the cross platform reach of ODBC (obviously connecting MS Access to MS SQL is not an issue, and may be better in a Microsoft use scenario). Lastly some good news about OLEDB: community.spiceworks.com/topic/2090199-microsoft-announces-that-ole-db-is-no-longer-deprecated
@markbuckland5015
@markbuckland5015 9 жыл бұрын
Hi Steve, still enjoying the videos. Now up to No 10 in the advanced course; however, I am having a problem with creating the User DSN to enable me to open the Northwind Db using VBA. I get to give the connection the name of Northwind , but Server name gives me 4 options as follows: (local) (local) Main-PC Main-PC When I select either it comes up with the following errors SQLState 0100 SQLServer Error 2 SQLState 0800 SQLServer Error 17 SQL Server does not exist or access denied. I would appreciate if you could assist as to where the error is Regards Mark
@ProgrammingMadeEZ
@ProgrammingMadeEZ 9 жыл бұрын
+Mark Buckland try using the name of your computer and the instance name of the sql server. You can find the name of the sql server by opening up your services panel. Then enter it in like this: ComputerName\MSSQLSERVER
@markbuckland5015
@markbuckland5015 9 жыл бұрын
+Programming Hi Steve, thanks for the assistance. I have successfully created a User DNS connection and it tested OK but when I try run the code in the test module an error occurs when I try to open the Northwind db. It says "Could not find file Northwind". Can you assist again. Thanks in advance Regards Mark
@ProgrammingMadeEZ
@ProgrammingMadeEZ 9 жыл бұрын
I have no way of knowing your settings. I'm afraid you need more direct assistance.
@markbuckland5015
@markbuckland5015 9 жыл бұрын
+Programming Thanks for the reply. I will endeavour to find the source of the problem. Thanks again for the series of videos, I have learnt a lot. Regards Mark
@jricardoantu2000
@jricardoantu2000 7 жыл бұрын
VERY GOOD
@ProgrammingMadeEZ
@ProgrammingMadeEZ 7 жыл бұрын
Thank you.
@claudiohuerta1305
@claudiohuerta1305 7 жыл бұрын
Hi, excelent course, i work with Oracle almost back end process, to create another layer of security i use Views and instead of. Ej: CREATE OR REPLACE TRIGGER TG_VWUNIDSINS INSTEAD OF INSERT ON VWUNIDS DECLARE BEGIN if :new.TIPO = 'E' then pkPLANESA.EmpresaINS(:new.NOMBRE ,:new.DESCRIPCION); elsif :new.TIPO = 'U' then pkPLANESA.UnidadINS(:new.NOMBRE ,:new.DESCRIPCION ,:new.PAPA); elsif :new.TIPO = 'P' then pkPLANESA.PuntoINS(:new.NOMBRE ,:new.DESCRIPCION ,:new.PAPA); end if; END TG_VWUNIDSINS; / I think this is a good technique, again tks a lot for the tutorial.
@ProgrammingMadeEZ
@ProgrammingMadeEZ 7 жыл бұрын
Triggers and views are a pretty good practice for locking down access and managing the data flow. I highly recommend doing it if you have the time and resources.
@codekabinettcomen
@codekabinettcomen 7 жыл бұрын
Very interesting! Unfortunately, I can find any way to do a real query instead of opening just the whole table. That makes rather unusable in real projects.
@ProgrammingMadeEZ
@ProgrammingMadeEZ 7 жыл бұрын
+codekabinett.com/en Keep watching. Each video builds on the previous ones.
9. (Advanced Programming In Access 2013) DAO vs ADO
28:45
Programming Made EZ
Рет қаралды 48 М.
ROSÉ & Bruno Mars - APT. (Official Music Video)
02:54
ROSÉ
Рет қаралды 321 МЛН
the balloon deflated while it was flying #tiktok
00:19
Анастасия Тарасова
Рет қаралды 36 МЛН
Каха и лужа  #непосредственнокаха
00:15
Understanding the DAO Object Library in VBA Code
13:16
Pharos Technology
Рет қаралды 1 М.
Connect to Microsoft SQL Server using VBA
6:36
SimpleExcelVBA
Рет қаралды 13 М.
12. (Advanced Programming In Access 2013) Using ADO Recordsets in VBA
24:02
Programming Made EZ
Рет қаралды 35 М.
how to connect Access and SQL server
12:07
Lisa Balbach
Рет қаралды 19 М.
How to Open a RecordSet in Access VBA and Loop Through the Records
12:45
Sean MacKenzie Data Engineering
Рет қаралды 26 М.
Microsoft Access Tips | How to use VBA Recordsets and Modules
19:23
LoopLearnings
Рет қаралды 4,4 М.
ROSÉ & Bruno Mars - APT. (Official Music Video)
02:54
ROSÉ
Рет қаралды 321 МЛН